public class BufferUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static ByteBuffer |
copy(ByteBuffer buffer)
Copy of a ByteBuffer into a heap buffer
|
static byte[] |
toArray(ByteBuffer buffer)
Convert a ByteBuffer to a byte array.
|
static byte[] |
toArray(Collection<ByteBuffer> buffers) |
public static byte[] toArray(ByteBuffer buffer)
buffer - The buffer to convert in flush mode. The buffer is not altered.public static byte[] toArray(Collection<ByteBuffer> buffers)
public static ByteBuffer copy(ByteBuffer buffer)
buffer - The buffer to copy.Copyright © 2015–2022 Red Hat. All rights reserved.