Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

java.nio
Class CharBufferImpl  view CharBufferImpl download CharBufferImpl.java

java.lang.Object
  extended byjava.nio.Buffer
      extended byjava.nio.CharBuffer
          extended byjava.nio.CharBufferImpl
All Implemented Interfaces:
java.lang.CharSequence, java.lang.Comparable

final class CharBufferImpl
extends CharBuffer

This is a Heap memory implementation


Field Summary
private  boolean readOnly
           
 
Fields inherited from class java.nio.CharBuffer
array_offset, backing_buffer
 
Fields inherited from class java.nio.Buffer
address, cap, limit, mark, pos
 
Constructor Summary
(package private) CharBufferImpl(char[] buffer, int offset, int capacity, int limit, int position, int mark, boolean readOnly)
           
  CharBufferImpl(CharBufferImpl copy)
           
(package private) CharBufferImpl(int capacity)
           
 
Method Summary
 CharBuffer asReadOnlyBuffer()
          Creates a new read-only CharBuffer that shares this buffer's content.
 CharBuffer compact()
          Compacts this buffer.
 CharBuffer duplicate()
          Creates a new CharBuffer that shares this buffer's content.
 char get()
          Reads the char at this buffer's current position, and then increments the position.
 CharBuffer get(char[] dst, int offset, int length)
          Bulk get, overloaded for speed.
 char get(int index)
          Absolute get method.
 boolean isDirect()
          Tells wether or not this buffer is direct.
 boolean isReadOnly()
          Tells whether this buffer is read only or not.
 ByteOrder order()
          Returns the byte order of this buffer.
 CharBuffer put(char value)
          Relative put method.
 CharBuffer put(char[] src, int offset, int length)
          Bulk put, overloaded for speed.
 CharBuffer put(int index, char value)
          Absolute put method.
 CharBuffer slice()
          Creates a new CharBuffer whose content is a shared subsequence of this buffer's content.
 java.lang.CharSequence subSequence(int start, int end)
          Creates a new character buffer that represents the specified subsequence of this buffer, relative to the current position.
 
Methods inherited from class java.nio.CharBuffer
allocate, array, arrayOffset, charAt, compareTo, equals, get, hasArray, hashCode, length, put, put, put, put, toString, wrap, wrap, wrap, wrap
 
Methods inherited from class java.nio.Buffer
capacity, checkArraySize, checkForOverflow, checkForOverflow, checkForUnderflow, checkForUnderflow, checkIfReadOnly, checkIndex, clear, flip, hasRemaining, limit, limit, mark, position, position, remaining, reset, rewind
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

readOnly

private boolean readOnly
Constructor Detail

CharBufferImpl

CharBufferImpl(int capacity)

CharBufferImpl

CharBufferImpl(char[] buffer,
               int offset,
               int capacity,
               int limit,
               int position,
               int mark,
               boolean readOnly)

CharBufferImpl

public CharBufferImpl(CharBufferImpl copy)
Method Detail

isReadOnly

public boolean isReadOnly()
Description copied from class: Buffer
Tells whether this buffer is read only or not.

Specified by:
isReadOnly in class Buffer

slice

public CharBuffer slice()
Description copied from class: CharBuffer
Creates a new CharBuffer whose content is a shared subsequence of this buffer's content.

Specified by:
slice in class CharBuffer

duplicate

public CharBuffer duplicate()
Description copied from class: CharBuffer
Creates a new CharBuffer that shares this buffer's content.

Specified by:
duplicate in class CharBuffer

asReadOnlyBuffer

public CharBuffer asReadOnlyBuffer()
Description copied from class: CharBuffer
Creates a new read-only CharBuffer that shares this buffer's content.

Specified by:
asReadOnlyBuffer in class CharBuffer

compact

public CharBuffer compact()
Description copied from class: CharBuffer
Compacts this buffer.

Specified by:
compact in class CharBuffer

isDirect

public boolean isDirect()
Description copied from class: CharBuffer
Tells wether or not this buffer is direct.

Specified by:
isDirect in class CharBuffer

subSequence

public java.lang.CharSequence subSequence(int start,
                                          int end)
Description copied from class: CharBuffer
Creates a new character buffer that represents the specified subsequence of this buffer, relative to the current position.

Specified by:
subSequence in interface java.lang.CharSequence
Specified by:
subSequence in class CharBuffer

get

public char get()
Reads the char at this buffer's current position, and then increments the position.

Specified by:
get in class CharBuffer

put

public CharBuffer put(char value)
Relative put method. Writes value to the next position in the buffer.

Specified by:
put in class CharBuffer

get

public char get(int index)
Absolute get method. Reads the char at position index.

Specified by:
get in class CharBuffer

get

public CharBuffer get(char[] dst,
                      int offset,
                      int length)
Bulk get, overloaded for speed.

Overrides:
get in class CharBuffer

put

public CharBuffer put(char[] src,
                      int offset,
                      int length)
Bulk put, overloaded for speed.

Overrides:
put in class CharBuffer

put

public CharBuffer put(int index,
                      char value)
Absolute put method. Writes value to position index in the buffer.

Specified by:
put in class CharBuffer

order

public ByteOrder order()
Description copied from class: CharBuffer
Returns the byte order of this buffer.

Specified by:
order in class CharBuffer