org.simantics.databoard.util.binary
Class InputStreamReadable
java.lang.Object
org.simantics.databoard.util.binary.InputStreamReadable
- All Implemented Interfaces:
- java.io.DataInput, BinaryReadable
public class InputStreamReadable
- extends java.lang.Object
- implements BinaryReadable
Input stream reader
- Author:
- Toni Kalajainen (toni.kalajainen@vtt.fi)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InputStreamReadable
public InputStreamReadable(java.io.InputStream is,
long limit)
readFully
public static BinaryReadable readFully(java.io.InputStream is)
throws java.io.IOException
- Throws:
java.io.IOException
readLine
public final java.lang.String readLine()
throws java.io.IOException
- Specified by:
readLine
in interface java.io.DataInput
- Throws:
java.io.IOException
readByte
public byte readByte()
throws java.io.IOException
- Specified by:
readByte
in interface java.io.DataInput
- Throws:
java.io.IOException
readChar
public char readChar()
throws java.io.IOException
- Specified by:
readChar
in interface java.io.DataInput
- Throws:
java.io.IOException
readUnsignedByte
public int readUnsignedByte()
throws java.io.IOException
- Specified by:
readUnsignedByte
in interface java.io.DataInput
- Throws:
java.io.IOException
readBoolean
public boolean readBoolean()
throws java.io.IOException
- Specified by:
readBoolean
in interface java.io.DataInput
- Throws:
java.io.IOException
readFully
public void readFully(byte[] dst,
int offset,
int length)
throws java.io.IOException
- Specified by:
readFully
in interface java.io.DataInput
- Throws:
java.io.IOException
readFully
public void readFully(byte[] dst)
throws java.io.IOException
- Specified by:
readFully
in interface java.io.DataInput
- Throws:
java.io.IOException
readFully
public void readFully(java.nio.ByteBuffer buf)
throws java.io.IOException
- Description copied from interface:
BinaryReadable
- Read buf fully
- Specified by:
readFully
in interface BinaryReadable
- Throws:
java.io.IOException
readFully
public void readFully(java.nio.ByteBuffer buf,
int length)
throws java.io.IOException
- Description copied from interface:
BinaryReadable
- Read fully length bytes
- Specified by:
readFully
in interface BinaryReadable
- Throws:
java.io.IOException
readDouble
public double readDouble()
throws java.io.IOException
- Specified by:
readDouble
in interface java.io.DataInput
- Throws:
java.io.IOException
readFloat
public float readFloat()
throws java.io.IOException
- Specified by:
readFloat
in interface java.io.DataInput
- Throws:
java.io.IOException
readUTF
public final java.lang.String readUTF()
throws java.io.IOException
- Specified by:
readUTF
in interface java.io.DataInput
- Throws:
java.io.IOException
readInt
public int readInt()
throws java.io.IOException
- Specified by:
readInt
in interface java.io.DataInput
- Throws:
java.io.IOException
readLong
public long readLong()
throws java.io.IOException
- Specified by:
readLong
in interface java.io.DataInput
- Throws:
java.io.IOException
readShort
public short readShort()
throws java.io.IOException
- Specified by:
readShort
in interface java.io.DataInput
- Throws:
java.io.IOException
readUnsignedShort
public int readUnsignedShort()
throws java.io.IOException
- Specified by:
readUnsignedShort
in interface java.io.DataInput
- Throws:
java.io.IOException
length
public long length()
- Specified by:
length
in interface BinaryReadable
position
public long position()
- Specified by:
position
in interface BinaryReadable
skipBytes
public long skipBytes(long bytes)
throws java.io.IOException
- Specified by:
skipBytes
in interface BinaryReadable
- Throws:
java.io.IOException
skipBytes
public int skipBytes(int bytes)
throws java.io.IOException
- Specified by:
skipBytes
in interface java.io.DataInput
- Throws:
java.io.IOException