public class ReadableDataStream extends Object implements ReadableDataPipe
ReadableDataPipe
that uses standard io (not nio).Constructor and Description |
---|
ReadableDataStream(DataInputStream stream) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
DataInputStream |
getInputStream() |
boolean |
readBoolean() |
boolean[] |
readBooleanArray(boolean[] values) |
byte |
readByte() |
byte[] |
readByteArray(byte[] bytes) |
double |
readDouble() |
double[] |
readDoubleArray(double[] values) |
float |
readFloat() |
float[] |
readFloatArray(float[] values) |
int |
readInt() |
int[] |
readIntArray(int[] values) |
long |
readLong() |
long[] |
readLongArray(long[] values) |
short |
readShort() |
short[] |
readShortArray(short[] values) |
String |
readString()
Reads a string encoded in true UTF-8 format (not Java's modified UTF).
|
public ReadableDataStream(DataInputStream stream)
public boolean readBoolean() throws IOException
readBoolean
in interface ReadableDataPipe
IOException
public byte readByte() throws IOException
readByte
in interface ReadableDataPipe
IOException
public double readDouble() throws IOException
readDouble
in interface ReadableDataPipe
IOException
public float readFloat() throws IOException
readFloat
in interface ReadableDataPipe
IOException
public int readInt() throws IOException
readInt
in interface ReadableDataPipe
IOException
public long readLong() throws IOException
readLong
in interface ReadableDataPipe
IOException
public short readShort() throws IOException
readShort
in interface ReadableDataPipe
IOException
public String readString() throws IOException
ReadableDataPipe
readString
in interface ReadableDataPipe
IOException
public byte[] readByteArray(byte[] bytes) throws IOException
readByteArray
in interface ReadableDataPipe
IOException
public boolean[] readBooleanArray(boolean[] values) throws IOException
readBooleanArray
in interface ReadableDataPipe
IOException
public short[] readShortArray(short[] values) throws IOException
readShortArray
in interface ReadableDataPipe
IOException
public int[] readIntArray(int[] values) throws IOException
readIntArray
in interface ReadableDataPipe
IOException
public long[] readLongArray(long[] values) throws IOException
readLongArray
in interface ReadableDataPipe
IOException
public float[] readFloatArray(float[] values) throws IOException
readFloatArray
in interface ReadableDataPipe
IOException
public double[] readDoubleArray(double[] values) throws IOException
readDoubleArray
in interface ReadableDataPipe
IOException
public void close() throws IOException
close
in interface ReadableDataPipe
IOException
public DataInputStream getInputStream()
getInputStream
in interface ReadableDataPipe
Copyright © 2018 Metron, Inc.. All rights reserved.