/** * Overrides <code>InputStream.mark()</code> to provide a working implementation of the method. * * @throws IOException if something went wrong */ @Override public synchronized void reset() throws IOException { seek(this.markOffset); }
public void seek(long offset) throws IOException { rais.seek(offset); } }
@Override public int read() throws IOException { if (remaining-- <= 0) { if (addDummyByte) { addDummyByte = false; return 0; } return -1; } synchronized (rais) { rais.seek(loc++); return rais.read(); } }
@Override public int read(byte[] b, int off, int len) throws IOException { if (remaining <= 0) { if (addDummyByte) { addDummyByte = false; b[off] = 0; return 1; } return -1; } if (len <= 0) { return 0; } if (len > remaining) { len = (int) remaining; } int ret; synchronized (rais) { rais.seek(loc); ret = rais.read(b, off, len); } if (ret > 0) { loc += ret; remaining -= ret; } return ret; }
public isoPvd(byte[] pvd, RandomAccessInputStream rais, int start, int sectSize, long shiftOffset) throws IOException { rais.seek(IsoUtil.offsetInSector(start, sectSize, false) + shiftOffset); if (rais.read(pvd) == -1) throw new IOException("unable to read PVD"); load(pvd); }
seek(newOffset);
rais.seek(IsoUtil.offsetInSector(extent - sector_offset, sectSize, false) + shiftOffset); StreamUtils.readFully(rais, buffer); len -= buffer.length;
((RandomAccessInputStream)in).seek(0);
IsoEntryInputStream(RandomAccessInputStream rais, IsoArchiveEntry entry) throws IOException { this.rais = rais; this.size = entry.getSize(); this.pos = 0; this.sectSize = entry.getSectSize(); this.audio = entry.getAudio(); rais.seek(IsoUtil.offsetInSector(entry.getIndex(), sectSize, audio) + entry.getShiftOffset()); }
rais.seek(dataOffset);
rais.seek(offset);
rais.seek(srcOffset); raos.seek(destOffset);