com.metsci.glimpse.util.io.datapipe
Class ReadableDataStream
java.lang.Object
com.metsci.glimpse.util.io.datapipe.ReadableDataStream
- All Implemented Interfaces:
- ReadableDataPipe
public class ReadableDataStream
- extends java.lang.Object
- implements ReadableDataPipe
An implementation of ReadableDataPipe
that uses standard io (not nio).
- Author:
- hogye
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadableDataStream
public ReadableDataStream(java.io.DataInputStream stream)
readBoolean
public boolean readBoolean()
throws java.io.IOException
- Specified by:
readBoolean
in interface ReadableDataPipe
- Throws:
java.io.IOException
readByte
public byte readByte()
throws java.io.IOException
- Specified by:
readByte
in interface ReadableDataPipe
- Throws:
java.io.IOException
readDouble
public double readDouble()
throws java.io.IOException
- Specified by:
readDouble
in interface ReadableDataPipe
- Throws:
java.io.IOException
readFloat
public float readFloat()
throws java.io.IOException
- Specified by:
readFloat
in interface ReadableDataPipe
- Throws:
java.io.IOException
readInt
public int readInt()
throws java.io.IOException
- Specified by:
readInt
in interface ReadableDataPipe
- Throws:
java.io.IOException
readLong
public long readLong()
throws java.io.IOException
- Specified by:
readLong
in interface ReadableDataPipe
- Throws:
java.io.IOException
readShort
public short readShort()
throws java.io.IOException
- Specified by:
readShort
in interface ReadableDataPipe
- Throws:
java.io.IOException
readString
public java.lang.String readString()
throws java.io.IOException
- Description copied from interface:
ReadableDataPipe
- Reads a string encoded in true UTF-8 format (not Java's modified UTF).
- Specified by:
readString
in interface ReadableDataPipe
- Throws:
java.io.IOException
readByteArray
public byte[] readByteArray(byte[] bytes)
throws java.io.IOException
- Specified by:
readByteArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readBooleanArray
public boolean[] readBooleanArray(boolean[] values)
throws java.io.IOException
- Specified by:
readBooleanArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readShortArray
public short[] readShortArray(short[] values)
throws java.io.IOException
- Specified by:
readShortArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readIntArray
public int[] readIntArray(int[] values)
throws java.io.IOException
- Specified by:
readIntArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readLongArray
public long[] readLongArray(long[] values)
throws java.io.IOException
- Specified by:
readLongArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readFloatArray
public float[] readFloatArray(float[] values)
throws java.io.IOException
- Specified by:
readFloatArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
readDoubleArray
public double[] readDoubleArray(double[] values)
throws java.io.IOException
- Specified by:
readDoubleArray
in interface ReadableDataPipe
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface ReadableDataPipe
- Throws:
java.io.IOException
getInputStream
public java.io.DataInputStream getInputStream()
- Specified by:
getInputStream
in interface ReadableDataPipe
Copyright © 2012 Metron, Inc.. All Rights Reserved.