@Override public long skip(long n) throws IOException { return raf.skipBytes((int) n); }
/** * Skips the given number of bytes or throws an EOFException if * skipping failed. */ private void skipBytes(final int count) throws IOException { int totalSkipped = 0; while (totalSkipped < count) { int skippedNow = archive.skipBytes(count - totalSkipped); if (skippedNow <= 0) { throw new EOFException(); } totalSkipped += skippedNow; } }
/** * Skips the given number of bytes or throws an EOFException if * skipping failed. */ private void skipBytes(final int count) throws IOException { int totalSkipped = 0; while (totalSkipped < count) { final int skippedNow = archive.skipBytes(count - totalSkipped); if (skippedNow <= 0) { throw new EOFException(); } totalSkipped += skippedNow; } }
protected static void skipRecord(RandomAccessFile fileHandle, int offset) throws IOException { fileHandle.seek(offset); int length = fileHandle.readInt(); fileHandle.skipBytes(length); }
@Override public int skipBytes(int i) throws IOException { try { return getRaf().skipBytes(i); } catch (IOException ioe) { handleException(); throw ioe; } }
int lenToSkip = fileNameLen; while (lenToSkip > 0) { final int skipped = archive.skipBytes(lenToSkip); if (skipped <= 0) { throw new IOException(
int lenToSkip = fileNameLen; while (lenToSkip > 0) { int skipped = archive.skipBytes(lenToSkip); if (skipped <= 0) { throw new IOException("failed to skip file name in"
bufferPos = 0; bufferSize = 0; int n = raf.skipBytes(size - pos); totalBytesRetired = (int) raf.getFilePointer(); if (n <= 0) {
public int skipBytes(final int n) throws IOException { return file.skipBytes(n); }
public int skipBytes(int n) throws IOException { return delegate.skipBytes(n); }
void skipBytes(final int n) throws IOException { int bytesSkipped = ras.skipBytes(n); if(this.debug) { System.out.println("Skipping "+bytesSkipped+" bytes"); } }
private ChunkIterator() { data = new byte[chunkByteSize]; try { raf = new RandomAccessFile(file, "r"); raf.skipBytes(8); } catch (IOException e) { e.printStackTrace(); } }
int align(int boundary) throws IOException { int skip = (int) (boundary - (ras.getFilePointer() % boundary)) % boundary; if (skip != 0) { skip = ras.skipBytes(skip); } if(this.debug) { System.out.println("Aligning to boundary "+ boundary +". Offset is now "+ras.getFilePointer()); } return skip; }
raf.skipBytes(8); int actual; while ((actual = raf.read(buffer)) > 0) {
@Override public long skip(long n) throws IOException { return raf.skipBytes((int) n); } }
@Override public long skip(final long offset) { try { return file.skipBytes((int) offset); } catch (final IOException ex) { return 0; } }
@Override public int load(RandomAccessFile raAccFile) throws IOException { // 1 is for Type int count = 15; while (count != 0) { // TODO : do you want to keep paded data? count -= raAccFile.skipBytes(count); } return 16; } }
protected static void skipRecord(RandomAccessFile fileHandle, int offset) throws IOException { fileHandle.seek(offset); int length = fileHandle.readInt(); fileHandle.skipBytes(length); }
public static void skipBytes(RandomAccessFile raf, int bytes) throws IOException { int n = 0; while (n < bytes) { int skipped = raf.skipBytes(bytes - n); if (skipped == 0 && raf.getFilePointer() >= raf.length()) { throw new EOFException(); } n += skipped; } }