java.lang.Object
java.io.Writer
java.io.FilterWriter
de.siegmar.fastcsv.writer.FastBufferedWriter
- All Implemented Interfaces:
Writable,Closeable,Flushable,Appendable,AutoCloseable
High-performance buffered writer (without synchronization).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanprivate final char[]private intFields inherited from class java.io.FilterWriter
out -
Constructor Summary
ConstructorsConstructorDescriptionFastBufferedWriter(Writer writer, int bufferSize, boolean autoFlushBuffer, boolean autoFlushWriter) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidCalled to indicate that the current record is complete.voidflush()private voidvoidwrite(char[] cbuf, int off, int len) Writes a portion of an array of characters.voidwrite(int c) Writes a single character.voidWrites a portion of a string.
-
Field Details
-
buf
private final char[] buf -
autoFlushBuffer
private final boolean autoFlushBuffer -
autoFlushWriter
private final boolean autoFlushWriter -
pos
private int pos
-
-
Constructor Details
-
FastBufferedWriter
FastBufferedWriter(Writer writer, int bufferSize, boolean autoFlushBuffer, boolean autoFlushWriter)
-
-
Method Details
-
write
Description copied from interface:WritableWrites a single character.- Specified by:
writein interfaceWritable- Overrides:
writein classFilterWriter- Parameters:
c- the character to write- Throws:
IOException- See Also:
-
write
Description copied from interface:WritableWrites a portion of an array of characters.- Specified by:
writein interfaceWritable- Overrides:
writein classFilterWriter- Parameters:
cbuf- the array of characters to writeoff- the offset from which to start writing characterslen- the number of characters to write- Throws:
IOException- See Also:
-
write
Description copied from interface:WritableWrites a portion of a string.- Specified by:
writein interfaceWritable- Overrides:
writein classFilterWriter- Parameters:
str- the string to writeoff- the offset from which to start writing characterslen- the number of characters to write- Throws:
IOException- See Also:
-
endRecord
Description copied from interface:WritableCalled to indicate that the current record is complete.- Specified by:
endRecordin interfaceWritable- Throws:
IOException- if an I/O error occurs
-
flushBuffer
- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classFilterWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterWriter- Throws:
IOException
-