List of usage examples for org.apache.cassandra.io.util RandomAccessReader bytesPastMark
public long bytesPastMark(DataPosition mark)
From source file:com.fullcontact.cassandra.io.util.BufferedRandomAccessFileTest.java
License:Apache License
@Test public void testBytesPastMark() throws IOException { File tmpFile = File.createTempFile("overflowtest", "bin"); tmpFile.deleteOnExit();//w ww.j a v a2 s. c o m // Create the BRAF by filename instead of by file. final RandomAccessReader r = RandomAccessReader.open(new Path(new File(tmpFile.getPath()).getPath()), fs); assert tmpFile.getPath().equals(r.getPath()); // Create a mark and move the rw there. final FileMark mark = r.mark(); r.reset(mark); // Expect this call to succeed. r.bytesPastMark(mark); }