Top Description Fields Constructors Methods
de.siegmar.fastcsv.writer

pack-priv Class FastBufferedWriter

extends FilterWriter
implements Writable
Class Inheritance
All Implemented Interfaces
de.siegmar.fastcsv.writer.Writable, java.io.Flushable, java.io.Closeable, java.lang.AutoCloseable
Known Direct Subclasses
de.siegmar.fastcsv.writer.AutoflushingFastBufferedWriter
Imports
java.io.FilterWriter, .IOException, .Writer

High-performance buffered writer (without synchronization).

Field Summary

Modifier and TypeField and Description
private final char[]
private int
Inherited from java.io.FilterWriter:
out

Constructor Summary

AccessConstructor and Description
pack-priv
FastBufferedWriter(final Writer writer, final int bufferSize)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.FilterWriter.close.

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public void
endRecord()

Implements de.siegmar.fastcsv.writer.Writable.endRecord.

Called to indicate that the current record is complete.

public void
flush()

Overrides java.io.FilterWriter.flush.

Implements java.io.Flushable.flush.

Flushes this stream by writing any buffered output to the underlying stream.

private void
public void
write(final int c)

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Writes a single character.

public void
write(final char[] cbuf, final int off, final int len)

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Writes a portion of an array of characters.

public void
write(final String str, final int off, final int len)

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Writes a portion of a string.

Field Detail

bufback to summary
private final char[] buf
posback to summary
private int pos

Constructor Detail

FastBufferedWriterback to summary
pack-priv FastBufferedWriter(final Writer writer, final int bufferSize)

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.FilterWriter.close.

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
endRecordback to summary
public void endRecord() throws IOException

Implements de.siegmar.fastcsv.writer.Writable.endRecord.

Doc from de.siegmar.fastcsv.writer.Writable.endRecord.

Called to indicate that the current record is complete.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
flushback to summary
public void flush() throws IOException

Overrides java.io.FilterWriter.flush.

Implements java.io.Flushable.flush.

Doc from java.io.Flushable.flush.

Flushes this stream by writing any buffered output to the underlying stream.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
flushBufferback to summary
private void flushBuffer() throws IOException
writeback to summary
public void write(final int c) throws IOException

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Doc from de.siegmar.fastcsv.writer.Writable.write.

Writes a single character.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.FilterWriter.write.

If an I/O error occurs

writeback to summary
public void write(final char[] cbuf, final int off, final int len) throws IOException

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Doc from de.siegmar.fastcsv.writer.Writable.write.

Writes a portion of an array of characters.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.FilterWriter.write.

If an I/O error occurs

writeback to summary
public void write(final String str, final int off, final int len) throws IOException

Overrides java.io.FilterWriter.write.

Implements de.siegmar.fastcsv.writer.Writable.write.

Doc from de.siegmar.fastcsv.writer.Writable.write.

Writes a portion of a string.

Annotations
@Override
Exceptions
IOException:

Doc from java.io.FilterWriter.write.

If an I/O error occurs