Package io.hekate.codec
Class StreamDataReader
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- java.io.DataInputStream
-
- io.hekate.codec.StreamDataReader
-
- All Implemented Interfaces:
DataReader
,Closeable
,DataInput
,AutoCloseable
public class StreamDataReader extends DataInputStream implements DataReader
Basic implementation ofDataReader
that wrapsInputStream
.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description StreamDataReader(InputStream in)
Creates a data reader that uses the specified underlying input stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
asStream()
Casts this writer to theInputStream
interface.-
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
-
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
-
Methods inherited from interface io.hekate.codec.DataReader
readBigDecimal, readBigInteger, readVarInt, readVarIntUnsigned, readVarLong, readVarLongUnsigned
-
-
-
-
Constructor Detail
-
StreamDataReader
public StreamDataReader(InputStream in)
Creates a data reader that uses the specified underlying input stream.- Parameters:
in
- Input stream
-
-
Method Detail
-
asStream
public InputStream asStream()
Description copied from interface:DataReader
Casts this writer to theInputStream
interface.- Specified by:
asStream
in interfaceDataReader
- Returns:
- This writer as
InputStream
.
-
-