liquibase.resource
Class UtfBomStripperInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
java.io.PushbackInputStream
liquibase.resource.UtfBomStripperInputStream
- All Implemented Interfaces:
- Closeable
public class UtfBomStripperInputStream
- extends PushbackInputStream
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.
- Author:
- Dominique Broeglin, Vity
Methods inherited from class java.io.PushbackInputStream |
available, close, mark, markSupported, read, read, reset, skip, unread, unread, unread |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UtfBomStripperInputStream
public UtfBomStripperInputStream(InputStream in)
throws IOException
- Throws:
IOException
getDetectedCharsetName
public String getDetectedCharsetName()
- 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
protected void init()
throws IOException
- Throws:
IOException
Copyright © 2016 Liquibase.org. All rights reserved.