| Access | Constructor and Description |
|---|---|
| pack-priv | |
| protected | DirectByteBufferR(int cap, long addr, FileDescriptor fd, Runnable unmapper, boolean isSync, MemorySegment segment)
|
| pack-priv | DirectByteBufferR(DirectBuffer db, int mark, int pos, int lim, int cap, int off, FileDescriptor fd, boolean isSync, MemorySegment segment)
|
| Modifier and Type | Method and Description |
|---|---|
| public CharBuffer | asCharBuffer()
Overrides java. Creates a view of this byte buffer as a char buffer. |
| public DoubleBuffer | asDoubleBuffer()
Overrides java. Creates a view of this byte buffer as a double buffer. |
| public FloatBuffer | asFloatBuffer()
Overrides java. Creates a view of this byte buffer as a float buffer. |
| public IntBuffer | asIntBuffer()
Overrides java. Creates a view of this byte buffer as an int buffer. |
| public LongBuffer | asLongBuffer()
Overrides java. Creates a view of this byte buffer as a long buffer. |
| public ByteBuffer | asReadOnlyBuffer()
Overrides java. Creates a new, read-only byte buffer that shares this buffer's content. |
| public ShortBuffer | asShortBuffer()
Overrides java. Creates a view of this byte buffer as a short buffer. |
| pack-priv Object | |
| public MappedByteBuffer | |
| public MappedByteBuffer | duplicate()
Overrides java. Creates a new byte buffer that shares this buffer's content. |
| pack-priv AbstractMemorySegmentImpl | heapSegment(Object base, long offset, long length, boolean readOnly, MemorySessionImpl bufferScope)
Overrides java.
|
| public boolean | isDirect()
Overrides java. Tells whether or not this byte buffer is direct. |
| public boolean | isReadOnly()
Overrides java. Tells whether or not this buffer is read-only. |
| public ByteBuffer | |
| public ByteBuffer | put(int i, byte x)
Overrides java. Absolute put method (optional operation). |
| public ByteBuffer | putChar(char x)
Overrides java. Relative put method for writing a char value (optional operation). |
| public ByteBuffer | putChar(int i, char x)
Overrides java. Absolute put method for writing a char value (optional operation). |
| public ByteBuffer | putDouble(double x)
Overrides java. Relative put method for writing a double value (optional operation). |
| public ByteBuffer | putDouble(int i, double x)
Overrides java. Absolute put method for writing a double value (optional operation). |
| public ByteBuffer | putFloat(float x)
Overrides java. Relative put method for writing a float value (optional operation). |
| public ByteBuffer | putFloat(int i, float x)
Overrides java. Absolute put method for writing a float value (optional operation). |
| public ByteBuffer | putInt(int x)
Overrides java. Relative put method for writing an int value (optional operation). |
| public ByteBuffer | putInt(int i, int x)
Overrides java. Absolute put method for writing an int value (optional operation). |
| public ByteBuffer | putLong(long x)
Overrides java. Relative put method for writing a long value (optional operation). |
| public ByteBuffer | putLong(int i, long x)
Overrides java. Absolute put method for writing a long value (optional operation). |
| public ByteBuffer | putShort(short x)
Overrides java. Relative put method for writing a short value (optional operation). |
| public ByteBuffer | putShort(int i, short x)
Overrides java. Absolute put method for writing a short value (optional operation). |
| pack-priv int | scaleShifts()
Overrides java. Returns the scale shifts for this Buffer. |
| public MappedByteBuffer | slice()
Overrides java. Creates a new byte buffer whose content is a shared subsequence of this buffer's content. |
| public MappedByteBuffer | slice(int index, int length)
Overrides java. Creates a new byte buffer whose content is a shared subsequence of this buffer's content. |
| DirectByteBufferR | back to summary |
|---|---|
| pack-priv DirectByteBufferR(int cap) | |
| DirectByteBufferR | back to summary |
|---|---|
| protected DirectByteBufferR(int cap, long addr, FileDescriptor fd, Runnable unmapper, boolean isSync, MemorySegment segment) | |
| DirectByteBufferR | back to summary |
|---|---|
| pack-priv DirectByteBufferR(DirectBuffer db, int mark, int pos, int lim, int cap, int off, FileDescriptor fd, boolean isSync, MemorySegment segment) | |
| asCharBuffer | back to summary |
|---|---|
| public CharBuffer asCharBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as a char buffer. 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 bytes remaining in this buffer divided by two, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| asDoubleBuffer | back to summary |
|---|---|
| public DoubleBuffer asDoubleBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as a double buffer. 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 bytes remaining in this buffer divided by eight, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| asFloatBuffer | back to summary |
|---|---|
| public FloatBuffer asFloatBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as a float buffer. 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 bytes remaining in this buffer divided by four, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| asIntBuffer | back to summary |
|---|---|
| public IntBuffer asIntBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as an int buffer. 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 bytes remaining in this buffer divided by four, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| asLongBuffer | back to summary |
|---|---|
| public LongBuffer asLongBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as a long buffer. 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 bytes remaining in this buffer divided by eight, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| asReadOnlyBuffer | back to summary |
|---|---|
| public ByteBuffer asReadOnlyBuffer() Overrides java. Doc from java. Creates a new, read-only byte 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,
and mark values will be identical to those of this buffer, and its byte
order will be If this buffer is itself read-only then this method behaves in
exactly the same way as the | |
| asShortBuffer | back to summary |
|---|---|
| public ShortBuffer asShortBuffer() Overrides java. Doc from java. Creates a view of this byte buffer as a short buffer. 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 bytes remaining in this buffer divided by two, its mark will be undefined, and its byte order will be that of the byte buffer at the moment the view is created. 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. | |
| base | back to summary |
|---|---|
| pack-priv Object base() Overrides java.
| |
| compact | back to summary |
|---|---|
| public MappedByteBuffer compact() Overrides java. Doc from java. Compacts this buffer (optional operation). The bytes between the buffer's current position and its limit,
if any, are copied to the beginning of the buffer. That is, the
byte at index p = The buffer's position is set to the number of bytes copied, rather than to zero, so that an invocation of this method can be followed immediately by an invocation of another relative put method. Invoke this method after writing data from a buffer in case the
write was incomplete. The following loop, for example, copies bytes
from one channel to another via the buffer buf.clear(); // Prepare buffer for use while (in.read(buf) >= 0 || buf.position != 0) { buf.flip(); out.write(buf); buf.compact(); // In case of partial write } | |
| duplicate | back to summary |
|---|---|
| public MappedByteBuffer duplicate() Overrides java. Doc from java. Creates a new byte 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,
and mark values will be identical to those of this buffer, and its byte
order will be | |
| heapSegment | back to summary |
|---|---|
| pack-priv AbstractMemorySegmentImpl heapSegment(Object base, long offset, long length, boolean readOnly, MemorySessionImpl bufferScope) Overrides java.
| |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Overrides java. Doc from java. Tells whether or not this byte buffer is direct. | |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides java. Doc from java. Tells whether or not this buffer is read-only. | |
| put | back to summary |
|---|---|
| public ByteBuffer put(byte x) Overrides java. Doc from java. Relative put method (optional operation). Writes the given byte into this buffer at the current position, and then increments the position. | |
| put | back to summary |
|---|---|
| public ByteBuffer put(int i, byte x) Overrides java. Doc from java. Absolute put method (optional operation). Writes the given byte into this buffer at the given index. | |
| putChar | back to summary |
|---|---|
| public ByteBuffer putChar(char x) Overrides java. Doc from java. Relative put method for writing a char value (optional operation). Writes two bytes containing the given char value, in the current byte order, into this buffer at the current position, and then increments the position by two. | |
| putChar | back to summary |
|---|---|
| public ByteBuffer putChar(int i, char x) Overrides java. Doc from java. Absolute put method for writing a char value (optional operation). Writes two bytes containing the given char value, in the current byte order, into this buffer at the given index. | |
| putDouble | back to summary |
|---|---|
| public ByteBuffer putDouble(double x) Overrides java. Doc from java. Relative put method for writing a double value (optional operation). Writes eight bytes containing the given double value, in the current byte order, into this buffer at the current position, and then increments the position by eight. | |
| putDouble | back to summary |
|---|---|
| public ByteBuffer putDouble(int i, double x) Overrides java. Doc from java. Absolute put method for writing a double value (optional operation). Writes eight bytes containing the given double value, in the current byte order, into this buffer at the given index. | |
| putFloat | back to summary |
|---|---|
| public ByteBuffer putFloat(float x) Overrides java. Doc from java. Relative put method for writing a float value (optional operation). Writes four bytes containing the given float value, in the current byte order, into this buffer at the current position, and then increments the position by four. | |
| putFloat | back to summary |
|---|---|
| public ByteBuffer putFloat(int i, float x) Overrides java. Doc from java. Absolute put method for writing a float value (optional operation). Writes four bytes containing the given float value, in the current byte order, into this buffer at the given index. | |
| putInt | back to summary |
|---|---|
| public ByteBuffer putInt(int x) Overrides java. Doc from java. Relative put method for writing an int value (optional operation). Writes four bytes containing the given int value, in the current byte order, into this buffer at the current position, and then increments the position by four. | |
| putInt | back to summary |
|---|---|
| public ByteBuffer putInt(int i, int x) Overrides java. Doc from java. Absolute put method for writing an int value (optional operation). Writes four bytes containing the given int value, in the current byte order, into this buffer at the given index. | |
| putLong | back to summary |
|---|---|
| public ByteBuffer putLong(long x) Overrides java. Doc from java. Relative put method for writing a long value (optional operation). Writes eight bytes containing the given long value, in the current byte order, into this buffer at the current position, and then increments the position by eight. | |
| putLong | back to summary |
|---|---|
| public ByteBuffer putLong(int i, long x) Overrides java. Doc from java. Absolute put method for writing a long value (optional operation). Writes eight bytes containing the given long value, in the current byte order, into this buffer at the given index. | |
| putShort | back to summary |
|---|---|
| public ByteBuffer putShort(short x) Overrides java. Doc from java. Relative put method for writing a short value (optional operation). Writes two bytes containing the given short value, in the current byte order, into this buffer at the current position, and then increments the position by two. | |
| putShort | back to summary |
|---|---|
| public ByteBuffer putShort(int i, short x) Overrides java. Doc from java. Absolute put method for writing a short value (optional operation). Writes two bytes containing the given short value, in the current byte order, into this buffer at the given index. | |
| scaleShifts | back to summary |
|---|---|
| pack-priv int scaleShifts() Overrides java. Doc from java. Returns the scale shifts for this Buffer. The scale shifts are: ByteBuffer: 0 ShortBuffer, CharBuffer: 1 IntBuffer, FloatBuffer: 2 LongBuffer, DoubleBuffer: 3
| |
| slice | back to summary |
|---|---|
| public MappedByteBuffer slice() Overrides java. Doc from java. Creates a new byte 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 bytes remaining in this buffer, its mark will be
undefined, and its byte order will be
Reading bytes into physical memory by invoking | |
| slice | back to summary |
|---|---|
| public MappedByteBuffer slice(int index, int length) Overrides java. Doc from java. Creates a new byte buffer whose content is a shared subsequence of this buffer's content. The content of the new buffer will start at position The new buffer's position will be zero, its capacity and its limit
will be Reading bytes into physical memory by invoking
| |