public class ArrayBuffer extends Buffer
| 构造器和说明 |
|---|
ArrayBuffer(int maxCapacity) |
| 限定符和类型 | 方法和说明 |
|---|---|
Object |
array()
Returns the array that backs this
buffer (optional operation).
|
int |
arrayOffset()
Returns the offset within this buffer's backing array of the first
element of the buffer (optional operation).
|
boolean |
hasArray()
Tells whether or not this buffer is backed by an accessible
array.
|
boolean |
isReadOnly()
Tells whether or not this buffer is read-only.
|
public boolean isReadOnly()
BufferisReadOnly 在类中 Bufferpublic boolean hasArray()
Buffer If this method returns true then the array
and arrayOffset methods may safely be invoked.
public Object array()
BufferThis method is intended to allow array-backed buffers to be passed to native code more efficiently. Concrete subclasses provide more strongly-typed return values for this method.
Modifications to this buffer's content will cause the returned array's content to be modified, and vice versa.
Invoke the hasArray method before invoking this
method in order to ensure that this buffer has an accessible backing
array.
public int arrayOffset()
BufferIf this buffer is backed by an array then buffer position p corresponds to array index p + arrayOffset().
Invoke the hasArray method before invoking this
method in order to ensure that this buffer has an accessible backing
array.
arrayOffset 在类中 BufferCopyright © 2020. All rights reserved.