diff options
Diffstat (limited to 'libjava/java/nio/CharViewBufferImpl.java')
-rw-r--r-- | libjava/java/nio/CharViewBufferImpl.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libjava/java/nio/CharViewBufferImpl.java b/libjava/java/nio/CharViewBufferImpl.java index ee99cfbe069..3c02108debc 100644 --- a/libjava/java/nio/CharViewBufferImpl.java +++ b/libjava/java/nio/CharViewBufferImpl.java @@ -66,6 +66,13 @@ class CharViewBufferImpl extends CharBuffer this.endian = endian; } + /** + * Reads the <code>char</code> at this buffer's current position, + * and then increments the position. + * + * @exception BufferUnderflowException If there are no remaining + * <code>char</code>s in this buffer. + */ public char get () { int p = position(); @@ -74,6 +81,15 @@ class CharViewBufferImpl extends CharBuffer return result; } + /** + * Absolute get method. Reads the <code>char</code> at position + * <code>index</code>. + * + * @param index Position to read the <code>char</code> from. + * + * @exception IndexOutOfBoundsException If index is negative or not smaller + * than the buffer's limit. + */ public char get (int index) { return ByteBufferHelper.getChar(bb, (index << 1) + offset, endian); |