public class BOMExclusionInputStream extends InputStream
If the first byte in the stream is 0xEF, this class will attempt to read the next two bytes. Results are undefined in the stream does not contain UTF-8 encoded data, as these next two bytes may not exist.
Constructor and Description |
---|
BOMExclusionInputStream(InputStream delegate) |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes available in the stream, including
the BOM.
|
void |
close() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] buf) |
int |
read(byte[] buf,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
public BOMExclusionInputStream(InputStream delegate)
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class InputStream
IOException
public int read(byte[] buf) throws IOException
read
in class InputStream
IOException
public boolean markSupported()
markSupported
in class InputStream
public void mark(int readlimit)
mark
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException