Class ByteReaderInputStream
java.lang.Object
java.io.InputStream
cool.scx.io.io_stream.CheckedInputStream
cool.scx.io.io_stream.ByteReaderInputStream
- All Implemented Interfaces:
Closeable, AutoCloseable
包装 ByteReader 的输入流
- Version:
- 0.0.1
- Author:
- scx567888
-
Field Summary
Fields inherited from class CheckedInputStream
closed -
Constructor Summary
ConstructorsConstructorDescriptionByteReaderInputStream(cool.scx.bytes.ByteReader dataReader) ByteReaderInputStream(cool.scx.bytes.supplier.ByteSupplier dataSupplier) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()cool.scx.bytes.ByteReadervoidmark(int readlimit) booleanintread()intread(byte[] b, int off, int len) byte[]byte[]readNBytes(int len) voidreset()longtransferTo(OutputStream out) Methods inherited from class CheckedInputStream
ensureOpen, isClosedMethods inherited from class InputStream
available, nullInputStream, read, readNBytes, skip, skipNBytes
-
Constructor Details
-
ByteReaderInputStream
public ByteReaderInputStream(cool.scx.bytes.ByteReader dataReader) -
ByteReaderInputStream
public ByteReaderInputStream(cool.scx.bytes.supplier.ByteSupplier dataSupplier)
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
transferTo
- Overrides:
transferToin classInputStream- Throws:
IOException
-
dataReader
public cool.scx.bytes.ByteReader dataReader() -
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
readNBytes
- Overrides:
readNBytesin classInputStream- Throws:
IOException
-
readAllBytes
- Overrides:
readAllBytesin classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-