aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/LongBufferImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/nio/LongBufferImpl.java')
-rw-r--r--libjava/java/nio/LongBufferImpl.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/libjava/java/nio/LongBufferImpl.java b/libjava/java/nio/LongBufferImpl.java
index df720eec62c..e82f7749cd5 100644
--- a/libjava/java/nio/LongBufferImpl.java
+++ b/libjava/java/nio/LongBufferImpl.java
@@ -1,5 +1,5 @@
/* LongBufferImpl.java --
- Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -80,6 +80,8 @@ final class LongBufferImpl extends LongBuffer
public LongBuffer compact ()
{
+ checkIfReadOnly();
+ mark = -1;
int copied = 0;
while (remaining () > 0)
@@ -89,6 +91,7 @@ final class LongBufferImpl extends LongBuffer
}
position (copied);
+ limit(capacity());
return this;
}
@@ -146,7 +149,7 @@ final class LongBufferImpl extends LongBuffer
}
/**
- * Absolute put method. Writes <code>value</value> to position
+ * Absolute put method. Writes <code>value</code> to position
* <code>index</code> in the buffer.
*
* @exception IndexOutOfBoundsException If index is negative or not smaller