summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/nio/Buffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/nio/Buffer.java')
-rw-r--r--libjava/classpath/java/nio/Buffer.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/libjava/classpath/java/nio/Buffer.java b/libjava/classpath/java/nio/Buffer.java
index c2569eea975..fce60c88ce2 100644
--- a/libjava/classpath/java/nio/Buffer.java
+++ b/libjava/classpath/java/nio/Buffer.java
@@ -45,19 +45,21 @@ import gnu.classpath.Pointer;
*/
public abstract class Buffer
{
- int cap = 0;
- int limit = 0;
- int pos = 0;
- int mark = -1;
- Pointer address;
+ private final int cap;
+ int limit;
+ int pos;
+ int mark;
+ final Pointer address;
/**
* Creates a new Buffer.
*
* Should be package private.
*/
- Buffer (int capacity, int limit, int position, int mark)
+ Buffer (int capacity, int limit, int position, int mark, Pointer address)
{
+ this.address = address;
+
if (capacity < 0)
throw new IllegalArgumentException ();
@@ -72,6 +74,10 @@ public abstract class Buffer
this.mark = mark;
}
+ else
+ {
+ this.mark = -1;
+ }
}
/**