org.apache.abdera.i18n.text.io
Class CharsetSniffingInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.apache.abdera.i18n.text.io.CharsetSniffingInputStream
- All Implemented Interfaces:
- Closeable
public class CharsetSniffingInputStream
- extends FilterInputStream
Will attempt to autodetect the character encoding from the stream By default, this will preserve the BOM if it exists
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encoding
protected String encoding
bomset
protected boolean bomset
preserve
protected final boolean preserve
CharsetSniffingInputStream
public CharsetSniffingInputStream(InputStream in)
CharsetSniffingInputStream
public CharsetSniffingInputStream(InputStream in,
boolean preserveBom)
isBomSet
public boolean isBomSet()
getEncoding
public String getEncoding()
getInternal
protected PeekAheadInputStream getInternal()
detectEncoding
protected String detectEncoding()
throws IOException
- Throws:
IOException
Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.