| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Document | |
| public Document | Returns: this instanceto append; may be source)null, which is treated like an
empty instance.to this instance. |
| public Document | |
| public boolean | Returns: true if the condition holds, else false.to test. sequence)if at least one line in this instance contains the given sequence. |
| public boolean | Returns: true if the content of the given document is
equal to the content of this instance, as per
List#equals(Object).to test; may be document)null, which is treated as
empty.if the given document has effectively the same content as this instance. |
| public Document | Returns: this instance.at which to remove a line. index)from this instance at the given index. |
| public String | Returns: the line at the given index.at which to retrieve the line. index)at the given index. |
| public Document | Returns: this instanceat which the specified line is to be inserted index, final String to be inserted line)at the specified index. |
| public boolean | |
| public static boolean | Returns: true if supported, else false.to test; charsetName)null returns false.for the given character set name. |
| public Document | Returns: this object.from which to load; must not be inputStream, final String null.null for the system default.this instance from the given input stream using the given character encoding. |
| public Document | |
| public Document | |
| public Document | |
| protected Document | Returns: this instance.required; by default, must be an instance of an
InputStream, Reader, File, or String denoting an
abstract file path. source, final String optional; ignored if source is a Writer. encoding)null is
taken to be Charset#defaultCharset().this instance from the given source. |
| public Document | Returns: this instance.content used to replace the existing content of this
instance; may be source)null, which is treated as
empty.as if by invoking |
| public Document | Returns: this object.to which to save; must not be outputStream, final String null.null for the system default.to the given output stream using the given character encoding. |
| public Document | |
| public Document | |
| public Document | |
| protected Document | Returns: this instance.required; by default, must be an instance of an
OutputStream, Writer, File, or String denoting an
abstract file path. target, final String optional; does not apply to Writer. encoding)null is taken
to be Charset#defaultCharset().this instance to the given target. |
| public Document | Returns: this instance.index of the line to replace index, final String to be stored at the specified index line)at the specified index in this instance. |
| public int |
| lines | back to summary |
|---|---|
| private final List<String> lines | |
| Document | back to summary |
|---|---|
| public Document() constructs a new, empty instance. | |
| Document | back to summary |
|---|---|
| public Document(final Document source) Constructs a new instance that is effectively a copy of
| |
| addSouceLine | back to summary |
|---|---|
| public Document addSouceLine(final String line) to this instance.
| |
| appendDocument | back to summary |
|---|---|
| public Document appendDocument(final Document source) to this instance.
| |
| clear | back to summary |
|---|---|
| public Document clear() this instance, making it
| |
| contains | back to summary |
|---|---|
| public boolean contains(final CharSequence sequence) if at least one line in this instance contains the given sequence. Note each line is tested separately; no test is performed to see if the sequence spans more than one line.
| |
| contentEquals | back to summary |
|---|---|
| public boolean contentEquals(final Document document) if the given document has effectively the same content as this instance.
| |
| deleteSourceLine | back to summary |
|---|---|
| public Document deleteSourceLine(final int index) from this instance at the given index.
| |
| getSourceLine | back to summary |
|---|---|
| public String getSourceLine(final int index) at the given index.
| |
| insertSourceLine | back to summary |
|---|---|
| public Document insertSourceLine(final int index, final String line) at the specified index.
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() if this instance contains no lines.
| |
| isSupportedCharset | back to summary |
|---|---|
| public static boolean isSupportedCharset(final String charsetName) for the given character set name.
| |
| load | back to summary |
|---|---|
| public Document load(final InputStream inputStream, final String encoding) throws IOException, IllegalArgumentException, NullPointerException this instance from the given input stream using the given character encoding. Note it is the responsibility of the caller to close the input stream.
| |
| load | back to summary |
|---|---|
| public Document load(final Reader reader) throws IOException, NullPointerException this instance from the given reader. Note it is the responsibility of the caller to close the reader.
| |
| load | back to summary |
|---|---|
| public Document load(final File file, final String encoding) throws IOException, IllegalArgumentException this instance from the given file using the given character encoding. Note the underlying file input stream is closed automatically.
| |
| load | back to summary |
|---|---|
| public Document load(final String path, final String encoding) throws IOException, IllegalArgumentException this instance from the given abstract file path using the given character encoding. Note the underlying file input stream is closed automatically.
| |
| load | back to summary |
|---|---|
| protected Document load(final Object source, final String encoding) throws IOException, NullPointerException, IllegalArgumentException this instance from the given source. Note if the source is an InputStream or Reader, it is the responsibility of the caller to close; otherwise, the underlying file input stream is closed automatically.
| |
| replaceWith | back to summary |
|---|---|
| public Document replaceWith(final Document source) as if by invoking | |
| save | back to summary |
|---|---|
| public Document save(final OutputStream outputStream, final String encoding) throws IOException to the given output stream using the given character encoding. Note it is the responsibility of the caller to close the output stream.
| |
| save | back to summary |
|---|---|
| public Document save(final File file, final String encoding) throws IOException, IllegalArgumentException to the given file using the given character encoding.
| |
| save | back to summary |
|---|---|
| public Document save(final String path, final String encoding) throws IOException, IllegalArgumentException to the given abstract file path using the given character encoding.
| |
| save | back to summary |
|---|---|
| public Document save(final Writer writer) throws IOException to the given writer. Note it is the responsibility of the caller to close the writer.
| |
| save | back to summary |
|---|---|
| protected Document save(final Object target, final String encoding) throws IOException this instance to the given target. Note if the target is an OutputStream or Writer, it is the responsibility of the caller to close; otherwise, the underlying file output stream is closed automatically.
| |
| setSourceLine | back to summary |
|---|---|
| public Document setSourceLine(final int index, final String line) at the specified index in this instance.
| |
| size | back to summary |
|---|---|
| public int size() of this instance, as the number of lines.
| |