Author: jbellis
Date: Thu Mar 31 22:40:52 2011
New Revision: 1087470
URL: http://svn.apache.org/viewvc?rev=1087470&view=rev
Log:
add seek position, fileLength too
Modified:
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java
Modified:
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java
URL:
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java?rev=1087470&r1=1087469&r2=1087470&view=diff
==============================================================================
---
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java
(original)
+++
cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/io/util/BufferedRandomAccessFile.java
Thu Mar 31 22:40:52 2011
@@ -338,7 +338,8 @@ public class BufferedRandomAccessFile ex
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;