Package org.apache.drill.common.util
Class DataInputInputStream
java.lang.Object
java.io.InputStream
org.apache.drill.common.util.DataInputInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()static InputStreamConstruct an InputStream from the given DataInput.intread()intread(byte[] b) intread(byte[] b, int off, int len) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Method Details
-
constructInputStream
Construct an InputStream from the given DataInput. If 'in' is already an InputStream, simply returns it. Otherwise, wraps it in an InputStream.- Parameters:
in- the DataInput to wrap- Returns:
- an InputStream instance that inputs to 'in'
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
available
public int available()- Overrides:
availablein classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-