Code example for RandomAccessFile

Methods: readByte

0
        } 
    } 
 
    public byte getc() throws IOException { 
        try { 
            return raf.readByte();
        } catch (IOException e) {
            PortableFileSystem.processIOException(e);
            throw e; //unreachable
        } 
    } 
 
    public byte[] read(int n) throws IOException {
        int read;
        byte[] bytes;
        try { 
            bytes = new byte[n];
            read = raf.read(bytes);
        } catch (IOException e) {
            PortableFileSystem.processIOException(e);
            throw e; //unreachable