@Override public int read(byte[] b, int off, int len) throws IOException { return rais.read(b, off, len); }
@Override public int read() throws IOException { return rais.read(); }
@Override public int read() throws IOException { return rais.read(); }
@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); }
if (rais.read(buffer, 0, (i == 7) ? 4 : 12) == -1) throw new IOException("unable to read tail of nrg file"); if (rais.read(buffer, 0, 8) == -1) throw new IOException("unable to read chunk in tail of nrg file"); boolean ETN2 = buffer[3] == '2'; if (rais.read(buffer, 0, (int) clen) == -1) throw new IOException("unable to read chunk in tail of nrg file"); if (rais.read(buffer, 0, 4) == -1) throw new IOException("unable to skip endian in DAO chunk"); if (rais.read(buffer, 0, (int) clen) == -1) throw new IOException("unable to read DAO chunk"); offset += 8 + clen; if (rais.read(buffer, 0, (int) clen) == -1) throw new IOException("unable to read CUEX chunk");
case IsoUtil.MODE1_2048: ret = rais.read(b, off, toRead); if (ret != -1) pos += ret; if (full >= 1) { for (int i = 0; i < full; i++) { ret = rais.read(b, cur, IsoUtil.MODE1_2048); if (ret != -1) pos += ret; cur += IsoUtil.MODE1_2048; ret = rais.read(b, cur, half); if (ret != -1) pos += ret; } else { ret = rais.read(b, cur, half); if (ret != -1) pos += ret;