RandomAccessFileOrArray implements DataInput { public int read() throws IOException { if(isBack) { isBack = false; return back & 0xff; } return byteSource.get(byteSourcePosition++); } @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);  }
@Test public void testSimple() throws Exception { for(int i = 0; i < data.length; i++){ Assert.assertEquals(data[i], (byte)rafoa.read()); } }