Package liquibase.util
Class BomAwareInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.PushbackInputStream
liquibase.util.BomAwareInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Read up to 4 bytes to determine the BOM. Extra bytes, of if no BOM is
found are pushed back to the input stream. If no BOM is found, the
detectedCharsetName is null.
-
Field Summary
Fields inherited from class java.io.PushbackInputStream
buf, posFields inherited from class java.io.FilterInputStream
in -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.PushbackInputStream
available, close, mark, markSupported, read, read, reset, skip, unread, unread, unreadMethods inherited from class java.io.FilterInputStream
read
-
Constructor Details
-
BomAwareInputStream
- Throws:
IOException
-
-
Method Details
-
getDetectedCharset
Returns detected charset name. Null if no BOM header was found.- Returns:
- charset name - one of UTF-8, UTF-16BE, UTF-32LE, UTF-16LE, UTF-32BE or null if no BOM detected
-
init
- Throws:
IOException
-