@Test public void testReset() throws IOException { String output = singleLineFileInit(file, Charsets.UTF_8); PositionTracker tracker = new DurablePositionTracker(meta, file.getPath()); ResettableInputStream in = new ResettableFileInputStream(file, tracker); String result1 = readLine(in, output.length()); assertEquals(output, result1); in.reset(); String result2 = readLine(in, output.length()); assertEquals(output, result2); String result3 = readLine(in, output.length()); assertNull("Should be null: " + result3, result3); in.close(); }
@Override public void reset() throws IOException { seek(tracker.getPosition()); }
ResettableFileInputStream extends ResettableInputStream implements RemoteMarkable, LengthMeasurable { @Override public void reset() throws IOException { seek(tracker.getPosition()); } }
ResettableFileInputStream extends ResettableInputStream implements RemoteMarkable, LengthMeasurable { @Override public void reset() throws IOException { seek(tracker.getPosition()); } ResettableFileInputStream(File file, PositionTracker tracker);  ResettableFileInputStream(File file, PositionTracker tracker,
      int bufSize, Charset charset, DecodeErrorPolicy decodeErrorPolicy); }
ResettableFileInputStream extends ResettableInputStream implements RemoteMarkable, LengthMeasurable { @Override public void reset() throws IOException { seek(tracker.getPosition()); } ResettableFileInputStream(File file, PositionTracker tracker);  ResettableFileInputStream(File file, PositionTracker tracker,
      int bufSize, Charset charset, DecodeErrorPolicy decodeErrorPolicy); @Override synchronized int read(); @Override synchronized int read(byte[] b, int off, int len); @Override synchronized int readChar(); @Override void mark(); @Override void markPosition(long position); @Override long getMarkPosition(); @Override void reset(); @Override long length(); @Override long tell(); @Override synchronized void seek(long newPos); @Override void close(); }
ResettableFileInputStream extends ResettableInputStream implements RemoteMarkable, LengthMeasurable { @Override public void reset() throws IOException { seek(tracker.getPosition()); } ResettableFileInputStream(File file, PositionTracker tracker);  ResettableFileInputStream(File file, PositionTracker tracker,
      int bufSize, Charset charset, DecodeErrorPolicy decodeErrorPolicy); @Override synchronized int read(); @Override synchronized int read(byte[] b, int off, int len); @Override synchronized int readChar(); @Override void mark(); @Override void markPosition(long position); @Override long getMarkPosition(); @Override void reset(); @Override long length(); @Override long tell(); @Override synchronized void seek(long newPos); @Override void close(); static final int DEFAULT_BUF_SIZE; }