@Test public void testSeek() throws Exception { RandomAccessFileOrArray rafoa = new RandomAccessFileOrArray(new RandomAccessSourceFactory().createSource(data)); rafoa.seek(72); for(int i = 72; i < data.length; i++){ Assert.assertEquals(data[i], (byte)rafoa.read()); } }
public void seek(long pos) throws IOException { byteSourcePosition = pos; isBack = false; }
RandomAccessFileOrArray implements DataInput { public void seek(long pos) throws IOException { byteSourcePosition = pos; isBack = false; } }
RandomAccessFileOrArray implements DataInput { public void seek(long pos) throws IOException { byteSourcePosition = pos; isBack = false; } @Deprecated  RandomAccessFileOrArray(String filename); @Deprecated  RandomAccessFileOrArray(RandomAccessFileOrArray source);  RandomAccessFileOrArray(RandomAccessSource byteSource); @Deprecated  RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess); @Deprecated  RandomAccessFileOrArray(URL url); @Deprecated  RandomAccessFileOrArray(InputStream is); @Deprecated  RandomAccessFileOrArray(byte arrayIn[]); }
RandomAccessFileOrArray implements DataInput { public void seek(long pos) throws IOException { byteSourcePosition = pos; isBack = false; } @Deprecated  RandomAccessFileOrArray(String filename); @Deprecated  RandomAccessFileOrArray(RandomAccessFileOrArray source);  RandomAccessFileOrArray(RandomAccessSource byteSource); @Deprecated  RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess); @Deprecated  RandomAccessFileOrArray(URL url); @Deprecated  RandomAccessFileOrArray(InputStream is); @Deprecated  RandomAccessFileOrArray(byte arrayIn[]); RandomAccessFileOrArray createView(); RandomAccessSource createSourceView(); void pushBack(byte b); int read(); int read(byte[] b, int off, int len); int read(byte b[]); void readFully(byte b[]); void readFully(byte b[], int off, int len); long skip(long n); int skipBytes(int n); @Deprecated //TODO: remove all references to this call, then remove this method void reOpen(); void close(); long length(); void seek(long pos); long getFilePointer(); boolean readBoolean(); byte readByte(); int readUnsignedByte(); short readShort(); final short readShortLE(); int readUnsignedShort(); final int readUnsignedShortLE(); char readChar(); final char readCharLE(); int readInt(); final int readIntLE(); final long readUnsignedInt(); final long readUnsignedIntLE(); long readLong(); final long readLongLE(); float readFloat(); final float readFloatLE(); double readDouble(); final double readDoubleLE(); String readLine(); String readUTF(); String readString(int length, String encoding); }
RandomAccessFileOrArray implements DataInput { public void seek(long pos) throws IOException { byteSourcePosition = pos; isBack = false; } @Deprecated  RandomAccessFileOrArray(String filename); @Deprecated  RandomAccessFileOrArray(RandomAccessFileOrArray source);  RandomAccessFileOrArray(RandomAccessSource byteSource); @Deprecated  RandomAccessFileOrArray(String filename, boolean forceRead, boolean plainRandomAccess); @Deprecated  RandomAccessFileOrArray(URL url); @Deprecated  RandomAccessFileOrArray(InputStream is); @Deprecated  RandomAccessFileOrArray(byte arrayIn[]); RandomAccessFileOrArray createView(); RandomAccessSource createSourceView(); void pushBack(byte b); int read(); int read(byte[] b, int off, int len); int read(byte b[]); void readFully(byte b[]); void readFully(byte b[], int off, int len); long skip(long n); int skipBytes(int n); @Deprecated //TODO: remove all references to this call, then remove this method void reOpen(); void close(); long length(); void seek(long pos); long getFilePointer(); boolean readBoolean(); byte readByte(); int readUnsignedByte(); short readShort(); final short readShortLE(); int readUnsignedShort(); final int readUnsignedShortLE(); char readChar(); final char readCharLE(); int readInt(); final int readIntLE(); final long readUnsignedInt(); final long readUnsignedIntLE(); long readLong(); final long readLongLE(); float readFloat(); final float readFloatLE(); double readDouble(); final double readDoubleLE(); String readLine(); String readUTF(); String readString(int length, String encoding);  }