ReadOnlyBufferException and overriding the view-buffer methods to return an
instance of this class rather than of the superclass.
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public FloatBuffer | asReadOnlyBuffer()
Overrides java. Creates a new, read-only float buffer that shares this buffer's content. |
| public FloatBuffer | |
| public FloatBuffer | duplicate()
Overrides java. Creates a new float buffer that shares this buffer's content. |
| public boolean | isReadOnly()
Overrides java. Tells whether or not this buffer is read-only. |
| public ByteOrder | |
| public FloatBuffer | |
| public FloatBuffer | put(int i, float x)
Overrides java. Absolute put method (optional operation). |
| public FloatBuffer | put(float[] src, int offset, int length)
Overrides java. Relative bulk put method (optional operation). |
| public FloatBuffer | put(FloatBuffer src)
Overrides java. Relative bulk put method (optional operation). |
| public FloatBuffer | put(int index, FloatBuffer src, int offset, int length)
Overrides java. Absolute bulk put method (optional operation). |
| public FloatBuffer | put(int index, float[] src, int offset, int length)
Overrides java. Absolute bulk put method (optional operation). |
| public FloatBuffer | slice()
Overrides java. Creates a new float buffer whose content is a shared subsequence of this buffer's content. |
| public FloatBuffer | slice(int index, int length)
Overrides java. Creates a new float buffer whose content is a shared subsequence of this buffer's content. |
| HeapFloatBufferR | back to summary |
|---|---|
| pack-priv HeapFloatBufferR(int cap, int lim, MemorySegment segment) | |
| HeapFloatBufferR | back to summary |
|---|---|
| pack-priv HeapFloatBufferR(float[] buf, int off, int len, MemorySegment segment) | |
| HeapFloatBufferR | back to summary |
|---|---|
| protected HeapFloatBufferR(float[] buf, int mark, int pos, int lim, int cap, int off, MemorySegment segment) | |
| asReadOnlyBuffer | back to summary |
|---|---|
| public FloatBuffer asReadOnlyBuffer() Overrides java. Doc from java. Creates a new, read-only float 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 | |
| compact | back to summary |
|---|---|
| public FloatBuffer compact() Overrides java. Doc from java. Compacts this buffer (optional operation). The floats between the buffer's current position and its limit,
if any, are copied to the beginning of the buffer. That is, the
float at index p = The buffer's position is set to the number of floats copied, rather than to zero, so that an invocation of this method can be followed immediately by an invocation of another relative put method. | |
| duplicate | back to summary |
|---|---|
| public FloatBuffer duplicate() Overrides java. Doc from java. Creates a new float 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. | |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides java. Doc from java. Tells whether or not this buffer is read-only. | |
| order | back to summary |
|---|---|
| public ByteOrder order() Overrides java. Doc from java. Retrieves this buffer's byte order. The byte order of a float buffer created by allocation or by
wrapping an existing | |
| put | back to summary |
|---|---|
| public FloatBuffer put(float x) Overrides java. Doc from java. Relative put method (optional operation). Writes the given float into this buffer at the current position, and then increments the position. | |
| put | back to summary |
|---|---|
| public FloatBuffer put(int i, float x) Overrides java. Doc from java. Absolute put method (optional operation). Writes the given float into this buffer at the given index. | |
| put | back to summary |
|---|---|
| public FloatBuffer put(float[] src, int offset, int length) Overrides java. Doc from java. Relative bulk put method (optional operation). This method transfers floats into this buffer from the given
source array. If there are more floats to be copied from the array
than remain in this buffer, that is, if
Otherwise, this method copies In other words, an invocation of this method of the form
for (int i = off; i < off + len; i++) dst.put(src[i]); | |
| put | back to summary |
|---|---|
| public FloatBuffer put(FloatBuffer src) Overrides java. Doc from java. Relative bulk put method (optional operation). This method transfers the floats remaining in the given source
buffer into this buffer. If there are more floats remaining in the
source buffer than in this buffer, that is, if
Otherwise, this method copies
n = In other words, an invocation of this method of the form
while (src.hasRemaining()) dst.put(src.get()); | |
| put | back to summary |
|---|---|
| public FloatBuffer put(int index, FloatBuffer src, int offset, int length) Overrides java. Doc from java. Absolute bulk put method (optional operation). This method transfers In other words, an invocation of this method of the form
for (int i = offset, j = index; i < offset + length; i++, j++) dst.put(j, src.get(i)); | |
| put | back to summary |
|---|---|
| public FloatBuffer put(int index, float[] src, int offset, int length) Overrides java. Doc from java. Absolute bulk put method (optional operation). This method transfers An invocation of this method of the form
for (int i = offset, j = index; i < offset + length; i++, j++) dst.put(j, src[i]); | |
| slice | back to summary |
|---|---|
| public FloatBuffer slice() Overrides java. Doc from java. Creates a new float 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 floats 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. | |
| slice | back to summary |
|---|---|
| public FloatBuffer slice(int index, int length) Overrides java. Doc from java. Creates a new float 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
| |