/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {@link #sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.get().binaryDecoder(this.sin, vin); datumIn = null; blockRemaining = 0; blockStart = position; }
/** Move to the specified synchronization point, as returned by {@link * DataFileWriter#sync()}. */ public synchronized void seek(long position) throws IOException { in.seek(position); blockCount = 0; blockStart = position; vin = DecoderFactory.get().binaryDecoder(in, vin); }
/** Move to the specified synchronization point, as returned by {@link * DataFileWriter#sync()}. */ public synchronized void seek(long position) throws IOException { in.seek(position); blockCount = 0; blockStart = position; vin = DecoderFactory.get().binaryDecoder(in, vin); }
in.seek(length-4); int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize);
in.seek(length-4); int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize);
/** Move to the next synchronization point after a position. */ @Override public synchronized void sync(long position) throws IOException { if (in.tell()+SYNC_SIZE >= in.length()) { seek(in.length()); return; } in.seek(position); vin.readFixed(syncBuffer); for (int i = 0; in.tell() < in.length(); i++) { int j = 0; for (; j < sync.length; j++) { if (sync[j] != syncBuffer[(i+j)%sync.length]) break; } if (j == sync.length) { // position before sync seek(in.tell() - SYNC_SIZE); return; } syncBuffer[i%sync.length] = (byte)in.read(); } seek(in.length()); }
/** Move to the next synchronization point after a position. */ @Override public synchronized void sync(long position) throws IOException { if (in.tell()+SYNC_SIZE >= in.length()) { seek(in.length()); return; } in.seek(position); vin.readFixed(syncBuffer); for (int i = 0; in.tell() < in.length(); i++) { int j = 0; for (; j < sync.length; j++) { if (sync[j] != syncBuffer[(i+j)%sync.length]) break; } if (j == sync.length) { // position before sync seek(in.tell() - SYNC_SIZE); return; } syncBuffer[i%sync.length] = (byte)in.read(); } seek(in.length()); }
/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {#sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.defaultFactory().createBinaryDecoder(this.sin, vin); datumIn = null; blockRemaining = 0; blockStart = position; }
/** Move to the specified synchronization point, as returned by {@link * DataFileWriter#sync()}. */ public synchronized void seek(long position) throws IOException { in.seek(position); blockCount = 0; blockStart = position; vin = DecoderFactory.get().binaryDecoder(in, vin); }
/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {#sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.defaultFactory().createBinaryDecoder(this.sin, vin); blockRemaining = 0; blockStart = position; }
/** Move to the specified synchronization point, as returned by {@link * DataFileWriter#sync()}. */ public synchronized void seek(long position) throws IOException { in.seek(position); blockCount = 0; blockStart = position; vin = DecoderFactory.get().binaryDecoder(in, vin); }
/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {@link #sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.get().binaryDecoder(this.sin, vin); datumIn = null; blockRemaining = 0; blockStart = position; }
/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {@link #sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.get().binaryDecoder(this.sin, vin); datumIn = null; blockRemaining = 0; blockStart = position; }
in.seek(length-4); int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize);
in.seek(length-4); int footerSize=(in.read()<<24)+(in.read()<<16)+(in.read()<<8)+in.read(); seek(length-footerSize);
/** Move to the next synchronization point after a position. */ @Override public synchronized void sync(long position) throws IOException { if (in.tell()+SYNC_SIZE >= in.length()) { seek(in.length()); return; } in.seek(position); vin.readFixed(syncBuffer); for (int i = 0; in.tell() < in.length(); i++) { int j = 0; for (; j < sync.length; j++) { if (sync[j] != syncBuffer[(i+j)%sync.length]) break; } if (j == sync.length) { // position before sync seek(in.tell() - SYNC_SIZE); return; } syncBuffer[i%sync.length] = (byte)in.read(); } seek(in.length()); }
/** Move to the next synchronization point after a position. */ @Override public synchronized void sync(long position) throws IOException { if (in.tell()+SYNC_SIZE >= in.length()) { seek(in.length()); return; } in.seek(position); vin.readFixed(syncBuffer); for (int i = 0; in.tell() < in.length(); i++) { int j = 0; for (; j < sync.length; j++) { if (sync[j] != syncBuffer[(i+j)%sync.length]) break; } if (j == sync.length) { // position before sync seek(in.tell() - SYNC_SIZE); return; } syncBuffer[i%sync.length] = (byte)in.read(); } seek(in.length()); }
/** Move to a specific, known synchronization point, one returned from {@link * DataFileWriter#sync()} while writing. If synchronization points were not * saved while writing a file, use {@link #sync(long)} instead. */ public void seek(long position) throws IOException { sin.seek(position); vin = DecoderFactory.get().binaryDecoder(this.sin, vin); datumIn = null; blockRemaining = 0; blockStart = position; }