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(java.nio.ByteBuffer byteBuffer)
Returns
Buffer, which wraps the ByteBuffer. |
Buffer |
wrap(java.lang.String s)
Returns
Buffer, which wraps the String. |
Buffer |
wrap(java.lang.String s,
java.nio.charset.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(java.lang.String s)
Buffer, which wraps the String.s - StringBuffer wrapper on top of passed String.Buffer wrap(java.lang.String s, java.nio.charset.Charset charset)
s - Stringcharset - Charset, which will be used, when converting
String to byte array.Buffer wrapper on top of passed String.Copyright © 2013 Oracle Corporation. All Rights Reserved.