@Override public ByteIn readReset(long startByteOffset) throws IOException { try{ RandomDataInputMemory clone = (RandomDataInputMemory) rdim.clone(); clone.seek(startByteOffset); ByteIn in = new ByteInputStream(clone, startByteOffset); return in; } catch (CloneNotSupportedException e) { throw new WrappedIOException(e); } } }
@Override public ByteIn readReset(long startByteOffset) throws IOException { try{ RandomDataInputMemory clone = (RandomDataInputMemory) rdim.clone(); clone.seek(startByteOffset); ByteIn in = new ByteInputStream(clone, startByteOffset); return in; } catch (CloneNotSupportedException e) { throw new WrappedIOException(e); } } }
/** * Reads from the file from a specific offset. After this * call, a sequence of read calls may follow. * @param startByteOffset the starting byte to read from * @param startBitOffset the bit offset in the starting byte */ public BitIn readReset(long startByteOffset, byte startBitOffset) throws IOException { try{ RandomDataInput rdi = (RandomDataInput)rdim.clone(); rdi.seek(startByteOffset); BitIn in = new BitInputStream(rdi); in.skipBits(startBitOffset); return in; } catch (CloneNotSupportedException e) { throw new WrappedIOException(e); } } /**
/** * Reads from the file from a specific offset. After this * call, a sequence of read calls may follow. * @param startByteOffset the starting byte to read from * @param startBitOffset the bit offset in the starting byte */ public BitIn readReset(long startByteOffset, byte startBitOffset) throws IOException { try{ RandomDataInput rdi = (RandomDataInput)rdim.clone(); rdi.seek(startByteOffset); BitIn in = new BitInputStream(rdi); in.skipBits(startBitOffset); return in; } catch (CloneNotSupportedException e) { throw new WrappedIOException(e); } } /**