Class UnicodeUtil.UnicodeInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.inductiveautomation.ignition.common.util.UnicodeUtil.UnicodeInputStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- UnicodeUtil
public static class UnicodeUtil.UnicodeInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description static int
BOM_SIZE
-
Constructor Summary
Constructors Constructor Description UnicodeInputStream(java.io.InputStream in, java.lang.String defaultEnc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
getBOMOffset()
java.lang.String
getDefaultEncoding()
java.lang.String
getEncoding()
protected void
init()
Read-ahead four bytes and check for BOM marks.int
read()
-
-
-
Field Detail
-
BOM_SIZE
public static final int BOM_SIZE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultEncoding
public java.lang.String getDefaultEncoding()
-
getEncoding
public java.lang.String getEncoding()
-
init
protected void init() throws java.io.IOException
Read-ahead four bytes and check for BOM marks. Extra bytes are unread back to the stream, only BOM bytes are skipped.- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException
- Specified by:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
getBOMOffset
public int getBOMOffset()
-
-