diff options
Diffstat (limited to 'libjava/java/nio/Buffer.java')
-rw-r--r-- | libjava/java/nio/Buffer.java | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/libjava/java/nio/Buffer.java b/libjava/java/nio/Buffer.java index 444d3d1..c24259f 100644 --- a/libjava/java/nio/Buffer.java +++ b/libjava/java/nio/Buffer.java @@ -45,10 +45,11 @@ public abstract class Buffer int pos = 0; int mark = -1; - // Creates a new Buffer. - // - // Should be package private. - // + /** + * Creates a new Buffer. + * + * Should be package private. + */ Buffer (int capacity, int limit, int position, int mark) { if (capacity < 0) @@ -69,6 +70,8 @@ public abstract class Buffer /** * Retrieves the capacity of the buffer. + * + * @return the capacity of the buffer */ public final int capacity () { @@ -77,6 +80,8 @@ public abstract class Buffer /** * Clears the buffer. + * + * @return this buffer */ public final Buffer clear () { @@ -88,6 +93,8 @@ public abstract class Buffer /** * Flips the buffer. + * + * @return this buffer */ public final Buffer flip () { @@ -99,6 +106,9 @@ public abstract class Buffer /** * Tells whether the buffer has remaining data to read or not. + * + * @return true if the buffer contains remaining data to read, + * false otherwise */ public final boolean hasRemaining () { @@ -107,11 +117,15 @@ public abstract class Buffer /** * Tells whether this buffer is read only or not. + * + * @return true if the buffer is read only, false otherwise */ public abstract boolean isReadOnly (); /** * Retrieves the current limit of the buffer. + * + * @return the limit of the buffer */ public final int limit () { @@ -124,6 +138,8 @@ public abstract class Buffer * @param newLimit The new limit value; must be non-negative and no larger * than this buffer's capacity. * + * @return this buffer + * * @exception IllegalArgumentException If the preconditions on newLimit * do not hold. */ @@ -144,6 +160,8 @@ public abstract class Buffer /** * Sets this buffer's mark at its position. + * + * @return this buffer */ public final Buffer mark () { @@ -153,6 +171,8 @@ public abstract class Buffer /** * Retrieves the current position of this buffer. + * + * @return the current position of this buffer */ public final int position () { @@ -165,7 +185,9 @@ public abstract class Buffer * * @param newPosition The new position value; must be non-negative and no * larger than the current limit. - * + * + * @return this buffer + * * @exception IllegalArgumentException If the preconditions on newPosition * do not hold */ @@ -183,6 +205,8 @@ public abstract class Buffer /** * Returns the number of elements between the current position and the limit. + * + * @return the number of remaining elements */ public final int remaining() { @@ -191,7 +215,9 @@ public abstract class Buffer /** * Resets this buffer's position to the previously-marked position. - * + * + * @return this buffer + * * @exception InvalidMarkException If the mark has not been set. */ public final Buffer reset() @@ -206,6 +232,8 @@ public abstract class Buffer /** * Rewinds this buffer. The position is set to zero and the mark * is discarded. + * + * @this buffer */ public final Buffer rewind() { |