@Test public void testReadByte() throws Exception { RandomAccessFile file = file(); byte[] data = range(0, 256); file.write(data); file.seek(0); BufferedFileInput buf = manage(new BufferedFileInput(file, 256)); for (int i = 0; i < data.length; i++) { assertThat(buf.readByte(), is((byte) i)); assertThat(buf.getPosition(), is((long) i + 1)); } eof(buf); }
@Override public byte readByte() throws IOException { return read(); }
BufferedFileInput implements RandomAccess, DataInput, Closeable { @Override public byte readByte() throws IOException { return read(); } }
BufferedFileInput implements RandomAccess, DataInput, Closeable { @Override public byte readByte() throws IOException { return read(); } BufferedFileInput(RandomAccessFile file, int bufferSize);  BufferedFileInput(RandomAccessFile file, byte[] buffer); }
BufferedFileInput implements RandomAccess, DataInput, Closeable { @Override public byte readByte() throws IOException { return read(); } BufferedFileInput(RandomAccessFile file, int bufferSize);  BufferedFileInput(RandomAccessFile file, byte[] buffer); void sync(); void seek(long position); long getPosition(); long getSize(); @Override void readFully(byte[] b); @Override void readFully(byte[] b, int off, int len); @Override int skipBytes(int n); @Override boolean readBoolean(); @Override short readShort(); @Override byte readByte(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override int readUnsignedByte(); @Override int readUnsignedShort(); @Override char readChar(); @Override String readLine(); @Override String readUTF(); @Override void close(); }
BufferedFileInput implements RandomAccess, DataInput, Closeable { @Override public byte readByte() throws IOException { return read(); } BufferedFileInput(RandomAccessFile file, int bufferSize);  BufferedFileInput(RandomAccessFile file, byte[] buffer); void sync(); void seek(long position); long getPosition(); long getSize(); @Override void readFully(byte[] b); @Override void readFully(byte[] b, int off, int len); @Override int skipBytes(int n); @Override boolean readBoolean(); @Override short readShort(); @Override byte readByte(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override int readUnsignedByte(); @Override int readUnsignedShort(); @Override char readChar(); @Override String readLine(); @Override String readUTF(); @Override void close();  }