public class InputStreamDataInput extends DataInput implements Closeable
DataInput
wrapping a plain InputStream
.Constructor and Description |
---|
InputStreamDataInput(InputStream is) |
Modifier and Type | Method and 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, readInt, readLong, readMapOfStrings, readSetOfStrings, readShort, readString, readStringSet, readStringStringMap, readVInt, readVLong, readZInt, readZLong, skipBytes
public InputStreamDataInput(InputStream is)
public byte readByte() throws IOException
DataInput
readByte
in class DataInput
IOException
DataOutput.writeByte(byte)
public void readBytes(byte[] b, int offset, int len) throws IOException
DataInput
readBytes
in class DataInput
b
- the array to read bytes intooffset
- the offset in the array to start storing byteslen
- the number of bytes to readIOException
DataOutput.writeBytes(byte[],int)
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.