public class PlainTextDocument
extends java.lang.Object
| Constructor and Description |
|---|
PlainTextDocument(java.io.InputStream stream)
Initializes a new instance of this class.
|
PlainTextDocument(java.io.InputStream stream,
LoadOptions loadOptions)
Initializes a new instance of this class.
|
PlainTextDocument(java.lang.String fileName)
Creates a plain text document from a file.
|
PlainTextDocument(java.lang.String fileName,
LoadOptions loadOptions)
Creates a plain text document from a file.
|
| Modifier and Type | Method and Description |
|---|---|
BuiltInDocumentProperties |
getBuiltInDocumentProperties()
Gets
getBuiltInDocumentProperties() of the document. |
CustomDocumentProperties |
getCustomDocumentProperties()
Gets
getCustomDocumentProperties() of the document. |
java.lang.String |
getText()
Gets textual content of the document concatenated as a string.
|
public PlainTextDocument(java.lang.String fileName)
throws java.lang.Exception
fileName - Name of the file to extract the text from.UnsupportedFileFormatException - The document format is not recognized or not supported.FileCorruptedException - The document appears to be corrupted and cannot be loaded.java.lang.RuntimeException - There is a problem with the document and it should be reported to Aspose.Words developers.java.io.IOException - There is an input/output exception.IncorrectPasswordException - The document is encrypted and requires a password to open, but you supplied an incorrect password.java.lang.IllegalArgumentException - The name of the file cannot be null or empty string.java.lang.Exceptionpublic PlainTextDocument(java.lang.String fileName,
LoadOptions loadOptions)
throws java.lang.Exception
fileName - Name of the file to extract the text from.loadOptions - Additional options to use when loading a document. Can be null.UnsupportedFileFormatException - The document format is not recognized or not supported.FileCorruptedException - The document appears to be corrupted and cannot be loaded.java.lang.RuntimeException - There is a problem with the document and it should be reported to Aspose.Words developers.java.io.IOException - There is an input/output exception.IncorrectPasswordException - The document is encrypted and requires a password to open, but you supplied an incorrect password.java.lang.IllegalArgumentException - The name of the file cannot be null or empty string.java.lang.Exceptionpublic PlainTextDocument(java.io.InputStream stream)
throws java.lang.Exception
java.lang.Exceptionpublic PlainTextDocument(java.io.InputStream stream,
LoadOptions loadOptions)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getText()
public BuiltInDocumentProperties getBuiltInDocumentProperties()
getBuiltInDocumentProperties() of the document.getBuiltInDocumentProperties() of the document.public CustomDocumentProperties getCustomDocumentProperties()
getCustomDocumentProperties() of the document.getCustomDocumentProperties() of the document.