APIdia Launch Partner
Top Constructors Methods
java.nio

pack-priv final Class DirectCharBufferRU

extends DirectCharBufferU
implements DirectBuffer
Class Inheritance
All Implemented Interfaces
sun.nio.ch.DirectBuffer
Imports
java.io.FileDescriptor, java.lang.foreign.MemorySegment, java.lang.ref.Reference, java.nio.BufferCleaner, java.util.Objects, jdk.internal.foreign.AbstractMemorySegmentImpl, .MemorySessionImpl, .SegmentFactories, jdk.internal.vm.annotation.ForceInline, jdk.internal.misc.ScopedMemoryAccess.ScopedAccessError, .VM, sun.nio.Cleaner, sun.nio.ch.DirectBuffer

Constructor Summary

AccessConstructor and Description
pack-priv
DirectCharBufferRU(DirectBuffer db, int mark, int pos, int lim, int cap, int off, MemorySegment segment)

Method Summary

Modifier and TypeMethod and Description
public CharBuffer
append(CharSequence csq, int start, int end)

Overrides java.nio.DirectCharBufferU.append.

Implements java.lang.Appendable.append.

Appends a subsequence of the specified character sequence to this buffer  (optional operation).

public CharBuffer
append(CharSequence csq)

Overrides java.nio.DirectCharBufferU.append.

Implements java.lang.Appendable.append.

Appends the specified character sequence to this buffer  (optional operation).

public CharBuffer
asReadOnlyBuffer()

Overrides java.nio.DirectCharBufferU.asReadOnlyBuffer.

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

pack-priv Object
pack-priv ByteOrder
public CharBuffer
compact()

Overrides java.nio.DirectCharBufferU.compact.

Compacts this buffer  (optional operation).

public CharBuffer
duplicate()

Overrides java.nio.DirectCharBufferU.duplicate.

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

public boolean
isDirect()

Overrides java.nio.DirectCharBufferU.isDirect.

Tells whether or not this char buffer is direct.

public boolean
isReadOnly()

Overrides java.nio.DirectCharBufferU.isReadOnly.

Tells whether or not this buffer is read-only.

public ByteOrder
order()

Overrides java.nio.DirectCharBufferU.order.

Retrieves this buffer's byte order.

public CharBuffer
put(char x)

Overrides java.nio.DirectCharBufferU.put.

Relative put method  (optional operation).

public CharBuffer
put(int i, char x)

Overrides java.nio.DirectCharBufferU.put.

Absolute put method  (optional operation).

public CharBuffer
slice()

Overrides java.nio.DirectCharBufferU.slice.

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

public CharBuffer
slice(int index, int length)

Overrides java.nio.DirectCharBufferU.slice.

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

public CharBuffer
subSequence(int start, int end)

Overrides java.nio.DirectCharBufferU.subSequence.

Implements java.lang.CharSequence.subSequence.

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

public String
toString(int start, int end)

Overrides java.nio.DirectCharBufferU.toString.

Inherited from java.nio.DirectCharBufferU:
addressattachmentcleanergetgetgetUnchecked

Constructor Detail

DirectCharBufferRUback to summary
pack-priv DirectCharBufferRU(DirectBuffer db, int mark, int pos, int lim, int cap, int off, MemorySegment segment)

Method Detail

appendback to summary
public CharBuffer append(CharSequence csq, int start, int end)

Overrides java.nio.DirectCharBufferU.append.

Implements java.lang.Appendable.append.

Doc from java.nio.CharBuffer.append.

Appends a subsequence of the specified character sequence to this buffer  (optional operation).

An invocation of this method of the form dst.append(csq, start, end) when csq is not null, behaves in exactly the same way as the invocation

dst.put(csq.subSequence(start, end).toString())
dst.put(csq.subSequence(start, end).toString())
appendback to summary
public CharBuffer append(CharSequence csq)

Overrides java.nio.DirectCharBufferU.append.

Implements java.lang.Appendable.append.

Doc from java.nio.CharBuffer.append.

Appends the specified character sequence to this buffer  (optional operation).

An invocation of this method of the form dst.append(csq) behaves in exactly the same way as the invocation

dst.put(csq.toString())
dst.put(csq.toString())

Depending on the specification of toString for the character sequence csq, the entire sequence may not be appended. For instance, invoking the toString method of a character buffer will return a subsequence whose content depends upon the buffer's position and limit.

asReadOnlyBufferback to summary
public CharBuffer asReadOnlyBuffer()

Overrides java.nio.DirectCharBufferU.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.

baseback to summary
pack-priv Object base()

Overrides java.nio.DirectCharBufferU.base.

Annotations
@Override
charRegionOrderback to summary
pack-priv ByteOrder charRegionOrder()

Overrides java.nio.DirectCharBufferU.charRegionOrder.

compactback to summary
public CharBuffer compact()

Overrides java.nio.DirectCharBufferU.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.

duplicateback to summary
public CharBuffer duplicate()

Overrides java.nio.DirectCharBufferU.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.

isDirectback to summary
public boolean isDirect()

Overrides java.nio.DirectCharBufferU.isDirect.

Doc from java.nio.CharBuffer.isDirect.

Tells whether or not this char buffer is direct.

isReadOnlyback to summary
public boolean isReadOnly()

Overrides java.nio.DirectCharBufferU.isReadOnly.

Doc from java.nio.Buffer.isReadOnly.

Tells whether or not this buffer is read-only.

orderback to summary
public ByteOrder order()

Overrides java.nio.DirectCharBufferU.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 CharBuffer put(char x)

Overrides java.nio.DirectCharBufferU.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 CharBuffer put(int i, char x)

Overrides java.nio.DirectCharBufferU.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()

Overrides java.nio.DirectCharBufferU.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)

Overrides java.nio.DirectCharBufferU.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 CharBuffer subSequence(int start, int end)

Overrides java.nio.DirectCharBufferU.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
public String toString(int start, int end)

Overrides java.nio.DirectCharBufferU.toString.