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 InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf)
throws IOException
read in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStreampublic void mark(int readlimit)
mark in class InputStreampublic void reset()
throws IOException
reset in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOException