mirror of https://github.com/apache/cassandra
add seek position, fileLength too
git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-0.7@1087470 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd1b798fa8
commit
f02b2ed0c1
|
|
@ -338,7 +338,8 @@ public class BufferedRandomAccessFile extends RandomAccessFile implements FileDa
|
|||
throw new IllegalArgumentException("new position should not be negative");
|
||||
|
||||
if (isReadOnly() && newPosition > fileLength)
|
||||
throw new EOFException("unable to seek past the end of " + filePath + " in read-only mode.");
|
||||
throw new EOFException(String.format("unable to seek to position %d in %s (%d bytes) in read-only mode",
|
||||
newPosition, filePath, fileLength));
|
||||
|
||||
current = newPosition;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue