APIdia Launch Partner
Top Fields Constructors Methods
java.nio

pack-priv final Class StringCharBuffer

extends CharBuffer
Class Inheritance
Imports
java.util.Objects

Field Summary

Modifier and TypeField and Description
pack-priv CharSequence
Inherited from java.nio.CharBuffer:
hbisReadOnlyoffset

Constructor Summary

AccessConstructor and Description
pack-priv
StringCharBuffer(CharSequence s, int start, int end)

private
StringCharBuffer(CharSequence s, int mark, int pos, int limit, int cap, int offset)

Method Summary

Modifier and TypeMethod and Description
public CharBuffer
asReadOnlyBuffer()

Implements abstract java.nio.CharBuffer.asReadOnlyBuffer.

Creates a new, read-only char buffer that shares this buffer's content.

pack-priv ByteOrder
public final CharBuffer
compact()

Implements abstract java.nio.CharBuffer.compact.

Compacts this buffer  (optional operation).

public int
compareTo(CharBuffer that)

Overrides java.nio.CharBuffer.compareTo.

Implements java.lang.Comparable.compareTo.

Compares this buffer to another.

public CharBuffer
duplicate()

Implements abstract java.nio.CharBuffer.duplicate.

Creates a new char buffer that shares this buffer's content.

public boolean
equals(Object ob)

Overrides java.nio.CharBuffer.equals.

Tells whether or not this buffer is equal to another object.

public final char
get()

Implements abstract java.nio.CharBuffer.get.

Relative get method.

public final char
get(int index)

Implements abstract java.nio.CharBuffer.get.

Absolute get method.

pack-priv CharBuffer
getArray(int index, char[] dst, int dstOffset, int length)

Overrides java.nio.CharBuffer.getArray.

pack-priv char
getUnchecked(int index)

Implements abstract java.nio.CharBuffer.getUnchecked.

Absolute get method.

pack-priv boolean
isAddressable()

Overrides java.nio.CharBuffer.isAddressable.

Tells whether this buffer has addressable memory, e.g., a Java array or a native address.

public boolean
isDirect()

Implements abstract java.nio.CharBuffer.isDirect.

Tells whether or not this char buffer is direct.

public final boolean
isReadOnly()

Implements abstract java.nio.Buffer.isReadOnly.

Tells whether or not this buffer is read-only.

public ByteOrder
order()

Implements abstract java.nio.CharBuffer.order.

Retrieves this buffer's byte order.

public final CharBuffer
put(char c)

Implements abstract java.nio.CharBuffer.put.

Relative put method  (optional operation).

public final CharBuffer
put(int index, char c)

Implements abstract java.nio.CharBuffer.put.

Absolute put method  (optional operation).

public CharBuffer
slice()

Implements abstract java.nio.CharBuffer.slice.

Creates a new char buffer whose content is a shared subsequence of this buffer's content.

public CharBuffer
slice(int index, int length)

Implements abstract java.nio.CharBuffer.slice.

Creates a new char buffer whose content is a shared subsequence of this buffer's content.

public final CharBuffer
subSequence(int start, int end)

Implements abstract java.nio.CharBuffer.subSequence.

Implements java.lang.CharSequence.subSequence.

Creates a new character buffer that represents the specified subsequence of this buffer, relative to the current position.

pack-priv final String
toString(int start, int end)

Implements abstract java.nio.CharBuffer.toString.

Inherited from java.nio.CharBuffer:
allocateappendappendappendarrayarrayOffsetbasecharAtcharsclearflipgetgetgetgetgetCharshasArrayhashCodeheapSegmentisEmptylengthlimitmarkmismatchpositionputputputputputputputputputArrayputBufferreadresetrewindscaleShiftstoStringwrapwrapwrapwrap

Field Detail

strback to summary
pack-priv CharSequence str

Constructor Detail

StringCharBufferback to summary
pack-priv StringCharBuffer(CharSequence s, int start, int end)
StringCharBufferback to summary
private StringCharBuffer(CharSequence s, int mark, int pos, int limit, int cap, int offset)

Method Detail

asReadOnlyBufferback to summary
public CharBuffer asReadOnlyBuffer()

Implements abstract java.nio.CharBuffer.asReadOnlyBuffer.

Doc from java.nio.CharBuffer.asReadOnlyBuffer.

Creates a new, read-only char buffer that shares this buffer's content.

The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer; the new buffer itself, however, will be read-only and will not allow the shared content to be modified. The two buffers' position, limit, and mark values will be independent.

The new buffer's capacity, limit, position, mark values, and byte order will be identical to those of this buffer.

If this buffer is itself read-only then this method behaves in exactly the same way as the duplicate method.

charRegionOrderback to summary
pack-priv ByteOrder charRegionOrder()

Implements abstract java.nio.CharBuffer.charRegionOrder.

compactback to summary
public final CharBuffer compact()

Implements abstract java.nio.CharBuffer.compact.

Doc from java.nio.CharBuffer.compact.

Compacts this buffer  (optional operation).

The chars between the buffer's current position and its limit, if any, are copied to the beginning of the buffer. That is, the char at index p = position() is copied to index zero, the char at index p + 1 is copied to index one, and so forth until the char at index limit() - 1 is copied to index n = limit() - 1 - p. The buffer's position is then set to n+1 and its limit is set to its capacity. The mark, if defined, is discarded.

The buffer's position is set to the number of chars copied, rather than to zero, so that an invocation of this method can be followed immediately by an invocation of another relative put method.

compareToback to summary
public int compareTo(CharBuffer that)

Overrides java.nio.CharBuffer.compareTo.

Implements java.lang.Comparable.compareTo.

Doc from java.nio.CharBuffer.compareTo.

Compares this buffer to another.

Two char buffers are compared by comparing their sequences of remaining elements lexicographically, without regard to the starting position of each sequence within its corresponding buffer. Pairs of char elements are compared as if by invoking Character#compare(char, char).

A char buffer is not comparable to any other type of object.

duplicateback to summary
public CharBuffer duplicate()

Implements abstract java.nio.CharBuffer.duplicate.

Doc from java.nio.CharBuffer.duplicate.

Creates a new char buffer that shares this buffer's content.

The content of the new buffer will be that of this buffer. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

The new buffer's capacity, limit, position, mark values, and byte order will be identical to those of this buffer. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

equalsback to summary
public boolean equals(Object ob)

Overrides java.nio.CharBuffer.equals.

Doc from java.nio.CharBuffer.equals.

Tells whether or not this buffer is equal to another object.

Two char buffers are equal if, and only if,

  1. They have the same element type,

  2. They have the same number of remaining elements, and

  3. The two sequences of remaining elements, considered independently of their starting positions, are pointwise equal.

A char buffer is not equal to any other type of object.

getback to summary
public final char get()

Implements abstract java.nio.CharBuffer.get.

Doc from java.nio.CharBuffer.get.

Relative get method. Reads the char at this buffer's current position, and then increments the position.

getback to summary
public final char get(int index)

Implements abstract java.nio.CharBuffer.get.

Doc from java.nio.CharBuffer.get.

Absolute get method. Reads the char at the given index.

getArrayback to summary
pack-priv CharBuffer getArray(int index, char[] dst, int dstOffset, int length)

Overrides java.nio.CharBuffer.getArray.

Annotations
@Override
getUncheckedback to summary
pack-priv char getUnchecked(int index)

Implements abstract java.nio.CharBuffer.getUnchecked.

Doc from java.nio.CharBuffer.getUnchecked.

Absolute get method. Reads the char at the given index without any validation of the index.

isAddressableback to summary
pack-priv boolean isAddressable()

Overrides java.nio.CharBuffer.isAddressable.

Doc from java.nio.CharBuffer.isAddressable.

Tells whether this buffer has addressable memory, e.g., a Java array or a native address. This method returns true. Subclasses such as StringCharBuffer, which wraps a CharSequence, should override this method to return false.

isDirectback to summary
public boolean isDirect()

Implements abstract java.nio.CharBuffer.isDirect.

Doc from java.nio.CharBuffer.isDirect.

Tells whether or not this char buffer is direct.

isReadOnlyback to summary
public final boolean isReadOnly()

Implements abstract java.nio.Buffer.isReadOnly.

Doc from java.nio.Buffer.isReadOnly.

Tells whether or not this buffer is read-only.

orderback to summary
public ByteOrder order()

Implements abstract java.nio.CharBuffer.order.

Doc from java.nio.CharBuffer.order.

Retrieves this buffer's byte order.

The byte order of a char buffer created by allocation or by wrapping an existing char array is the native order of the underlying hardware. The byte order of a char buffer created as a view of a byte buffer is that of the byte buffer at the moment that the view is created.

putback to summary
public final CharBuffer put(char c)

Implements abstract java.nio.CharBuffer.put.

Doc from java.nio.CharBuffer.put.

Relative put method  (optional operation).

Writes the given char into this buffer at the current position, and then increments the position.

putback to summary
public final CharBuffer put(int index, char c)

Implements abstract java.nio.CharBuffer.put.

Doc from java.nio.CharBuffer.put.

Absolute put method  (optional operation).

Writes the given char into this buffer at the given index.

sliceback to summary
public CharBuffer slice()

Implements abstract java.nio.CharBuffer.slice.

Doc from java.nio.CharBuffer.slice.

Creates a new char buffer whose content is a shared subsequence of this buffer's content.

The content of the new buffer will start at this buffer's current position. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

The new buffer's position will be zero, its capacity and its limit will be the number of chars remaining in this buffer, its mark will be undefined, and its byte order will be identical to that of this buffer. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

sliceback to summary
public CharBuffer slice(int index, int length)

Implements abstract java.nio.CharBuffer.slice.

Doc from java.nio.CharBuffer.slice.

Creates a new char buffer whose content is a shared subsequence of this buffer's content.

The content of the new buffer will start at position index in this buffer, and will contain length elements. Changes to this buffer's content will be visible in the new buffer, and vice versa; the two buffers' position, limit, and mark values will be independent.

The new buffer's position will be zero, its capacity and its limit will be length, its mark will be undefined, and its byte order will be identical to that of this buffer. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

Annotations
@Override
subSequenceback to summary
public final CharBuffer subSequence(int start, int end)

Implements abstract java.nio.CharBuffer.subSequence.

Implements java.lang.CharSequence.subSequence.

Doc from java.nio.CharBuffer.subSequence.

Creates a new character buffer that represents the specified subsequence of this buffer, relative to the current position.

The new buffer will share this buffer's content; that is, if the content of this buffer is mutable then modifications to one buffer will cause the other to be modified. The new buffer's capacity will be that of this buffer, its position will be position() + start, its limit will be position() + end, and its byte order will be identical to that of this buffer. The new buffer will be direct if, and only if, this buffer is direct, and it will be read-only if, and only if, this buffer is read-only.

toStringback to summary
pack-priv final String toString(int start, int end)

Implements abstract java.nio.CharBuffer.toString.