aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/Buffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/nio/Buffer.java')
-rw-r--r--libjava/java/nio/Buffer.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/libjava/java/nio/Buffer.java b/libjava/java/nio/Buffer.java
index f369b96..222b84f 100644
--- a/libjava/java/nio/Buffer.java
+++ b/libjava/java/nio/Buffer.java
@@ -45,22 +45,24 @@ import gnu.gcj.RawData;
*/
public abstract class Buffer
{
- int cap = 0;
- int limit = 0;
- int pos = 0;
- int mark = -1;
- RawData address;
+ private final int cap;
+ int limit;
+ int pos;
+ int mark;
+ final RawData 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,
+ RawData address)
{
if (capacity < 0)
throw new IllegalArgumentException ();
+ this.address = address;
cap = capacity;
limit (limit);
position (position);
@@ -72,6 +74,10 @@ public abstract class Buffer
this.mark = mark;
}
+ else
+ {
+ this.mark = -1;
+ }
}
/**