public class PlainTextDocument
Constructor Summary |
---|
PlainTextDocument(java.lang.StringfileName)
Creates a plain text document from a file. Automatically detects the file format. |
PlainTextDocument(java.lang.StringfileName, LoadOptions loadOptions)
Creates a plain text document from a file. Allows to specify additional options such as an encryption password. |
PlainTextDocument(java.io.InputStreamstream)
Creates a plain text document from a stream. Automatically detects the file format. |
PlainTextDocument(java.io.InputStreamstream, LoadOptions loadOptions)
Creates a plain text document from a stream. Allows to specify additional options such as an encryption password. |
Property Getters/Setters Summary | ||
---|---|---|
BuiltInDocumentProperties | getBuiltInDocumentProperties() | |
Gets |
||
CustomDocumentProperties | getCustomDocumentProperties() | |
Gets |
||
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.public 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.public PlainTextDocument(java.io.InputStream stream) throws java.lang.Exception
The document must be stored at the beginning of the stream.
stream
- The stream where to extract the text from.public PlainTextDocument(java.io.InputStream stream, LoadOptions loadOptions) throws java.lang.Exception
The document must be stored at the beginning of the stream.
stream
- The stream where to extract the text from.loadOptions
- Additional options to use when loading a document. Can be null.public BuiltInDocumentProperties getBuiltInDocumentProperties()
public CustomDocumentProperties getCustomDocumentProperties()
public java.lang.String getText()