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 Constructor Description InputStreamAndCharset(InputStream aIS, EUnicodeBOM eBOM, Charset aCharset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EUnicodeBOMgetBOM()CharsetgetCharset()CharsetgetCharset(Charset aFallbackCharset)InputStreamgetInputStream()Get the input stream to read from the object.booleanhasBOM()booleanhasCharset()booleanisReadMultiple()Check 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, wait
-
Methods inherited from interface com.helger.commons.io.IHasInputStream
getBufferedInputStream
-
-
-
-
Constructor Detail
-
InputStreamAndCharset
public InputStreamAndCharset(@Nonnull InputStream aIS, @Nullable EUnicodeBOM eBOM, @Nullable Charset aCharset)
-
-
Method Detail
-
getInputStream
@Nonnull public InputStream 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
@Nullable public EUnicodeBOM getBOM()
-
hasBOM
public boolean hasBOM()
-
hasCharset
public boolean hasCharset()
-
-