Top Description Constructors Methods
org.glassfish.grizzly.memory

public Class MemoryUtils

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, org.glassfish.grizzly.Buffer

Class has useful methods to simplify the work with Buffers.
Author
Alexey Stashok
See Also
MemoryManager, WrapperAware

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ByteBuffer
allocateByteBuffer(MemoryManager<E extends Buffer> memoryManager, int size)

public static ByteBuffer
reallocateByteBuffer(MemoryManager<E extends Buffer> memoryManager, ByteBuffer oldByteBuffer, int size)

public static void
releaseByteBuffer(MemoryManager<E extends Buffer> memoryManager, ByteBuffer byteBuffer)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

MemoryUtilsback to summary
public MemoryUtils()

Method Detail

allocateByteBufferback to summary
public static ByteBuffer allocateByteBuffer(MemoryManager<E extends Buffer> memoryManager, int size)
reallocateByteBufferback to summary
public static ByteBuffer reallocateByteBuffer(MemoryManager<E extends Buffer> memoryManager, ByteBuffer oldByteBuffer, int size)
releaseByteBufferback to summary
public static void releaseByteBuffer(MemoryManager<E extends Buffer> memoryManager, ByteBuffer byteBuffer)