Closeable, AutoCloseable, Cloneablepublic class InputStreamDataInput extends DataInput implements Closeable
DataInput wrapping a plain InputStream.| Constructor | Description |
|---|---|
InputStreamDataInput(InputStream is) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
byte |
readByte() |
Reads and returns a single byte.
|
void |
readBytes(byte[] b,
int offset,
int len) |
Reads a specified number of bytes into an array at the specified offset.
|
clone, readBytes, readChars, readInt, readLong, readShort, readString, readStringStringMap, readVInt, readVLong, setModifiedUTF8StringsModepublic InputStreamDataInput(InputStream is)
public byte readByte()
throws IOException
DataInputreadByte in class DataInputIOExceptionDataOutput.writeByte(byte)public void readBytes(byte[] b,
int offset,
int len)
throws IOException
DataInputreadBytes in class DataInputb - the array to read bytes intooffset - the offset in the array to start storing byteslen - the number of bytes to readIOExceptionDataOutput.writeBytes(byte[],int)public void close()
throws IOException
close in interface AutoCloseableclose in interface CloseableIOExceptionCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.