Package com.helger.commons.charset
Class CharsetHelper.InputStreamAndCharset
java.lang.Object
com.helger.commons.charset.CharsetHelper.InputStreamAndCharset
- All Implemented Interfaces:
IHasInputStream
- Enclosing class:
CharsetHelper
public static final class CharsetHelper.InputStreamAndCharset
extends Object
implements IHasInputStream
- Author:
- Philip Helger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBOM()getCharset(Charset aFallbackCharset) Get the input stream to read from the object.booleanhasBOM()booleanbooleanCheck if theInputStreamfromIHasInputStream.getInputStream()andIHasInputStream.getBufferedInputStream()can be acquired more than once.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.commons.io.IHasInputStream
getBufferedInputStream, withBufferedInputStreamDo, withInputStreamDo
-
Constructor Details
-
InputStreamAndCharset
public InputStreamAndCharset(@Nonnull InputStream aIS, @Nullable EUnicodeBOM eBOM, @Nullable Charset aCharset)
-
-
Method Details
-
getInputStream
Description copied from interface:IHasInputStreamGet the input stream to read from the object. Each time this method is called, a newInputStreamneeds to be created.- Specified by:
getInputStreamin interfaceIHasInputStream- Returns:
nullif resolving failed.
-
isReadMultiple
public boolean isReadMultiple()Description copied from interface:IHasInputStreamCheck if theInputStreamfromIHasInputStream.getInputStream()andIHasInputStream.getBufferedInputStream()can be acquired more than once.- Specified by:
isReadMultiplein interfaceIHasInputStream- Returns:
trueif the input stream can be acquired more than once,falseif not.
-
getBOM
-
hasBOM
public boolean hasBOM() -
getCharset
-
hasCharset
public boolean hasCharset() -
getCharset
-