java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.eclipse.parsson.UnicodeDetectingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
A filter stream that detects the unicode encoding for the original
stream
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte
private static final byte
private final byte[]
private int
private final Charset
private int
private static final byte
private static final byte
private static final byte
private static final byte
private static Charset
private static Charset
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
FF
private static final byte FF- See Also:
-
FE
private static final byte FE- See Also:
-
EF
private static final byte EF- See Also:
-
BB
private static final byte BB- See Also:
-
BF
private static final byte BF- See Also:
-
NUL
private static final byte NUL- See Also:
-
utf32Le
-
utf32Be
-
buf
private final byte[] buf -
bufLen
private int bufLen -
curIndex
private int curIndex -
charset
-
-
Constructor Details
-
UnicodeDetectingInputStream
UnicodeDetectingInputStream(InputStream is)
-
-
Method Details
-
getCharset
Charset getCharset() -
fillBuf
private void fillBuf() -
detectEncoding
-
getUtf32be
-
getUtf32le
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-