Package com.aoindustries.io.buffer
Class BufferWriter
- java.lang.Object
-
- java.io.Writer
-
- com.aoindustries.io.buffer.BufferWriter
-
- All Implemented Interfaces:
Closeable,Flushable,Appendable,AutoCloseable
- Direct Known Subclasses:
AutoTempFileWriter,CharArrayBufferWriter,LoggingWriter,NullBufferWriter,SegmentedWriter,TempFileWriter
public abstract class BufferWriter extends Writer
A buffered writer with results that may be trimmed, converted to String, and written to another writer.- Author:
- AO Industries, Inc.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBufferWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract longgetLength()Gets the number of characters in this buffer.abstract BufferResultgetResult()Gets the result from this buffer.abstract StringtoString()Gets a short message (like type and length).
-
-
-
Method Detail
-
getLength
public abstract long getLength() throws IOExceptionGets the number of characters in this buffer. Once closed, this length will not be modified.- Throws:
IOException
-
toString
public abstract String toString()
Gets a short message (like type and length).- Overrides:
toStringin classObject- See Also:
To get access to the buffered content.
-
getResult
public abstract BufferResult getResult() throws IllegalStateException, IOException
Gets the result from this buffer. The buffer must be closed.- Throws:
IllegalStateException- if not closedIOException
-
-