public long getFlushedPosition() throws IOException { return seekable.getFlushedPosition(); }
public long getFlushedPosition() throws IOException { return seekable.getFlushedPosition(); }
public long getFlushedPosition() throws IOException { return mSeekable.getFlushedPosition(); }
@Test public void testSeekFlush() throws Exception { SeekableInputStream seekable = makeInputStream(133); int pos = 45; seekable.seek(pos); seekable.flushBefore(pos); long flushedPos = seekable.getFlushedPosition(); assertEquals("Flushed positon should match position", pos, flushedPos); try { seekable.seek(pos - 1); fail("Read before flushed position succeeded"); } catch (IndexOutOfBoundsException e) { // Ignore } }
public void testSeekFlush() throws Exception { SeekableInputStream seekable = makeInputStream(133); int pos = 45; seekable.seek(pos); seekable.flushBefore(pos); long flushedPos = seekable.getFlushedPosition(); assertEquals("Flushed positon should match position", pos, flushedPos); try { seekable.seek(pos - 1); fail("Read before flushed position succeeded"); } catch (IndexOutOfBoundsException e) { // Ignore } }
@Test public void testSeekFlush() throws Exception { SeekableInputStream seekable = makeInputStream(133); int pos = 45; seekable.seek(pos); seekable.flushBefore(pos); long flushedPos = seekable.getFlushedPosition(); assertEquals("Flushed positon should match position", pos, flushedPos); try { seekable.seek(pos - 1); fail("Read before flushed position succeeded"); } catch (IndexOutOfBoundsException e) { // Ignore } }