Top Description Fields Constructors Methods
com.dd.plist

pack-priv Class ByteOrderMarkFilterInputStream

extends FilterInputStream
Class Inheritance
Imports
java.io.FilterInputStream, .IOException, .InputStream, java.util.LinkedList, .Queue

An input stream that filters the Byte Order Mark from the input.

Field Summary

Modifier and TypeField and Description
private final boolean
private final Queue<Integer>
private boolean
Inherited from java.io.FilterInputStream:
in

Constructor Summary

AccessConstructor and Description
public
ByteOrderMarkFilterInputStream(InputStream
the underlying input stream.
in
,
boolean
If set to false the original input stream is not closed when the filtered stream is closed.
closeStream
)

Creates a ByteOrderMarkFilterInputStream instance.

Method Summary

Modifier and TypeMethod and Description
public void
close()

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

Closes this input stream and releases any system resources associated with the stream.

public int
read()

Overrides java.io.FilterInputStream.read.

Reads the next byte of data from the input stream.

Inherited from java.io.FilterInputStream:
availablemarkmarkSupportedreadreadresetskip

Field Detail

closeStreamback to summary
private final boolean closeStream
consumedBytesback to summary
private final Queue<Integer> consumedBytes
readingBomback to summary
private boolean readingBom

Constructor Detail

ByteOrderMarkFilterInputStreamback to summary
public ByteOrderMarkFilterInputStream(InputStream in, boolean closeStream)

Creates a ByteOrderMarkFilterInputStream instance.

Parameters
in:InputStream

the underlying input stream.

closeStream:boolean

If set to false the original input stream is not closed when the filtered stream is closed.

Method Detail

closeback to summary
public void close() throws IOException

Overrides java.io.FilterInputStream.close.

Implements java.io.Closeable.close.

Doc from java.io.FilterInputStream.close.

Closes this input stream and releases any system resources associated with the stream.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.
readback to summary
public int read() throws IOException

Overrides java.io.FilterInputStream.read.

Doc from java.io.FilterInputStream.read.

Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs.