public class ByteBufferUtils extends Object
Modifier and Type | Method and Description |
---|---|
static ByteBuffer |
deepCopy(ByteBuffer input)
Allocates a new backing byte[] with a new ByteBuffer, and copies the contents of the input buffer to the copy.
|
static int |
transferData(ByteBuffer in,
ByteBuffer out)
Transfers as much data as possible from an input ByteBuffer to an output ByteBuffer
|
public static ByteBuffer deepCopy(ByteBuffer input)
input
- The ByteBuffer to copypublic static int transferData(ByteBuffer in, ByteBuffer out)
in
- The input ByteBufferout
- The output ByteBufferCopyright © 2019. All rights reserved.