Package org.dellroad.stuff.io
Class ByteBufferInputStream
java.lang.Object
java.io.InputStream
org.dellroad.stuff.io.ByteBufferInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Field Details
-
buf
The underlyingByteBuffer.
-
-
Constructor Details
-
ByteBufferInputStream
Constructor.- Parameters:
buf- buffer- Throws:
IllegalArgumentException- ifbufis null
-
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
available
- Overrides:
availablein 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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-