Package ucar.unidata.io
Class PositioningDataInputStream
- java.lang.Object
-
- ucar.unidata.io.PositioningDataInputStream
-
public class PositioningDataInputStream extends Object
Similar to a DataInputStream that keeps track of position. The position must always increase, no going backwards. Note cant handle byte order yet - assume big endian(?).
-
-
Constructor Summary
Constructors Constructor Description PositioningDataInputStream(InputStream is)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
read(long pos, byte[] dest, int off, int len)
void
readDouble(long pos, double[] dest, int off, int len)
void
readFloat(long pos, float[] dest, int off, int len)
void
readInt(long pos, int[] dest, int off, int len)
void
readLong(long pos, long[] dest, int off, int len)
void
readShort(long pos, short[] dest, int off, int len)
-
-
-
Constructor Detail
-
PositioningDataInputStream
public PositioningDataInputStream(InputStream is)
-
-
Method Detail
-
read
public void read(long pos, byte[] dest, int off, int len) throws IOException
- Throws:
IOException
-
readShort
public void readShort(long pos, short[] dest, int off, int len) throws IOException
- Throws:
IOException
-
readInt
public void readInt(long pos, int[] dest, int off, int len) throws IOException
- Throws:
IOException
-
readLong
public void readLong(long pos, long[] dest, int off, int len) throws IOException
- Throws:
IOException
-
readFloat
public void readFloat(long pos, float[] dest, int off, int len) throws IOException
- Throws:
IOException
-
readDouble
public void readDouble(long pos, double[] dest, int off, int len) throws IOException
- Throws:
IOException
-
-