Package de.xima.fc.common.io
Class MarkableNullInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- de.xima.fc.common.io.MarkableNullInputStream
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public final class MarkableNullInputStream extends InputStream AnInputStreamthat is always empty and markable / resettable.InputStream.nullInputStream()is not markable, this one is. Some use cases such as the ICU4J library require markable input streams.- Since:
- 8.3.0
- Author:
- XIMA Media GmbH
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()voidmark(int readLimit)static InputStreammarkableNullInputStream()Gets a new instance of a markable null input stream.booleanmarkSupported()intread()intread(byte[] b, int off, int len)byte[]readAllBytes()intreadNBytes(byte[] b, int off, int len)byte[]readNBytes(int len)voidreset()longskip(long n)longtransferTo(OutputStream out)- 
Methods inherited from class java.io.InputStreamnullInputStream, read
 
- 
 
- 
- 
- 
Method Detail- 
availablepublic int available() throws IOException- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
 - 
markpublic void mark(int readLimit) - Overrides:
- markin class- InputStream
 
 - 
markSupportedpublic boolean markSupported() - Overrides:
- markSupportedin class- InputStream
 
 - 
readpublic int read() throws IOException- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b, int off, int len) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readAllBytespublic byte[] readAllBytes() throws IOException- Overrides:
- readAllBytesin class- InputStream
- Throws:
- IOException
 
 - 
readNBytespublic int readNBytes(byte[] b, int off, int len) throws IOException- Overrides:
- readNBytesin class- InputStream
- Throws:
- IOException
 
 - 
readNBytespublic byte[] readNBytes(int len) throws IOException- Overrides:
- readNBytesin class- InputStream
- Throws:
- IOException
 
 - 
resetpublic void reset() throws IOException- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
 - 
skippublic long skip(long n) throws IOException- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
 - 
transferTopublic long transferTo(OutputStream out) throws IOException - Overrides:
- transferToin class- InputStream
- Throws:
- IOException
 
 - 
markableNullInputStreampublic static InputStream markableNullInputStream() Gets a new instance of a markable null input stream.- Returns:
- A new instance of a markable null input stream.
 
 
- 
 
-