public interface WrapperAware
MemoryManagers, which implement this interface, are able to convert
frequently used Java buffer types to Grizzly Buffer.MemoryUtils,
MemoryManager| Modifier and Type | Method and Description |
|---|---|
Buffer |
wrap(byte[] data)
Returns
Buffer, which wraps the byte array. |
Buffer |
wrap(byte[] data,
int offset,
int length)
Returns
Buffer, which wraps the part of byte array with
specific offset and length. |
Buffer |
wrap(ByteBuffer byteBuffer)
Returns
Buffer, which wraps the ByteBuffer. |
Buffer |
wrap(String s)
|
Buffer |
wrap(String s,
Charset charset)
|
Buffer wrap(byte[] data)
Buffer, which wraps the byte array.data - byte array to wrapBuffer wrapper on top of passed byte array.Buffer wrap(byte[] data, int offset, int length)
Buffer, which wraps the part of byte array with
specific offset and length.data - byte array to wrapoffset - byte buffer offsetlength - byte buffer lengthBuffer wrapper on top of passed byte array.Buffer wrap(ByteBuffer byteBuffer)
Buffer, which wraps the ByteBuffer.byteBuffer - ByteBuffer to wrapBuffer wrapper on top of passed ByteBuffer.Copyright © 2017–2019 Oracle Corporation. All rights reserved.