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 TypeMethodDescriptionint
void
close()
static InputStream
Construct an InputStream from the given DataInput.int
read()
int
read
(byte[] b) int
read
(byte[] b, int off, int len) Methods inherited from class java.io.InputStream
mark, markSupported, reset, skip
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
available
public int available()- Overrides:
available
in classInputStream
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-