Package com.stimulsoft.lib.io
Class StiUnicodeBOMInputStream
java.lang.Object
java.io.InputStream
com.stimulsoft.lib.io.StiUnicodeBOMInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Copyright Stimulsoft
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionStiUnicodeBOMInputStream(InputStream inputStream) Constructs a newUnicodeBOMInputStreamthat wraps the specifiedInputStream. -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()getBOM()Returns theBOMthat was detected in the wrappedInputStreamobject.voidmark(int readlimit) booleanintread()intread(byte[] b) intread(byte[] b, int off, int len) voidreset()longskip(long n) final StiUnicodeBOMInputStreamskipBOM()Skips theBOMthat was found in the wrappedInputStreamobject.Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
StiUnicodeBOMInputStream
Constructs a newUnicodeBOMInputStreamthat wraps the specifiedInputStream.- Parameters:
inputStream- anInputStream.- Throws:
NullPointerException- wheninputStreamisnull.IOException- on reading from the specifiedInputStreamwhen trying to detect the Unicode BOM.
-
-
Method Details
-
getBOM
Returns theBOMthat was detected in the wrappedInputStreamobject.- Returns:
- a
BOMvalue.
-
skipBOM
Skips theBOMthat was found in the wrappedInputStreamobject.- Returns:
- this
UnicodeBOMInputStream. - Throws:
IOException- when trying to skip the BOM from the wrappedInputStreamobject.
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOExceptionNullPointerException
-
read
- Overrides:
readin classInputStream- Throws:
IOExceptionNullPointerException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-