Code example for RandomAccessFile

Methods: skipBytes

0
        byte[] data;
 
        private ChunkIterator() { 
            data = new byte[chunkByteSize];
            try { 
                raf = new RandomAccessFile(file, "r");
                raf.skipBytes(8);
            } catch (IOException e) {
                e.printStackTrace();
            } 
        } 
 
        public boolean hasNext() { 
            try { 
                readByteAmount = raf.read(data);
                if (readByteAmount > 0) {
                    if (readByteAmount < chunkByteSize) {
                        data = Arrays.copyOf(data, readByteAmount);
                    } 
                    return true; 
                } else {