Class 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 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