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

pack-priv final Class BomInputStreamReader

extends Reader
Class Inheritance
Imports
java.io.IOException, .InputStream, .InputStreamReader, .Reader, java.nio.charset.Charset, de.siegmar.fastcsv.util.Nullable

InputStreamReader that is capable of detecting and handling BOM headers.

Field Summary

Modifier and TypeField and Description
private final Charset
private final InputStream
private Reader
Inherited from java.io.Reader:
lock

Constructor Summary

AccessConstructor and Description
pack-priv
BomInputStreamReader(final InputStream inputStream, final Charset defaultCharset)

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

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

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

Implements abstract java.io.Reader.read.

Reads characters into a portion of an array.

Inherited from java.io.Reader:
markmarkSupportednullReaderofreadreadreadreadAllAsStringreadAllLinesreadyresetskiptransferTo

Field Detail

defaultCharsetback to summary
private final Charset defaultCharset
inputStreamback to summary
private final InputStream inputStream
readerback to summary
private Reader reader
Annotations
@Nullable

Constructor Detail

BomInputStreamReaderback to summary
pack-priv BomInputStreamReader(final InputStream inputStream, final Charset defaultCharset)

Method Detail

closeback to summary
public void close() throws IOException

Implements abstract java.io.Reader.close.

Implements java.io.Closeable.close.

Doc from java.io.Reader.close.

Closes the stream and releases any system resources associated with it. Once the stream has been closed, further read(), ready(), mark(), reset(), or skip() invocations will throw an IOException. Closing a previously closed stream has no effect.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
readback to summary
public int read(final char[] cbuf, final int off, final int len) throws IOException

Implements abstract java.io.Reader.read.

Doc from java.io.Reader.read.

Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf.

Annotations
@SuppressWarnings:PMD.CloseResource
@Override
Exceptions
IOException:
If an I/O error occurs