public class NIOKt
| Modifier and Type | Method and Description |
|---|---|
static java.nio.ByteBuffer |
copy(java.nio.ByteBuffer $receiver,
int size)
Moves all bytes in
this buffer to a newly created buffer with the optionally specified size |
static java.nio.ByteBuffer |
copy(java.nio.ByteBuffer $receiver,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool,
int size)
Moves all bytes in
this buffer to a newly created buffer with the optionally specified size by allocating it from the given pool |
static java.lang.String |
decodeString(java.nio.ByteBuffer $receiver,
java.nio.charset.Charset charset)
Decodes a string from
this buffer with the specified charset |
static int |
moveTo(java.nio.ByteBuffer $receiver,
java.nio.ByteBuffer destination,
int limit)
Moves bytes from
this buffer to the destination buffer |
static byte[] |
moveToByteArray(java.nio.ByteBuffer $receiver)
Moves bytes from
this buffer into newly created ByteArray and returns it |
public static int moveTo(java.nio.ByteBuffer $receiver,
java.nio.ByteBuffer destination,
int limit)
Moves bytes from this buffer to the destination buffer
destination - is the buffer to copy bytes tolimit - is an optional parameter specifying maximum number of bytes to be movedpublic static byte[] moveToByteArray(java.nio.ByteBuffer $receiver)
Moves bytes from this buffer into newly created ByteArray and returns it
public static java.lang.String decodeString(java.nio.ByteBuffer $receiver,
java.nio.charset.Charset charset)
Decodes a string from this buffer with the specified charset
public static java.nio.ByteBuffer copy(java.nio.ByteBuffer $receiver,
int size)
Moves all bytes in this buffer to a newly created buffer with the optionally specified size
public static java.nio.ByteBuffer copy(java.nio.ByteBuffer $receiver,
kotlinx.io.pool.ObjectPool<java.nio.ByteBuffer> pool,
int size)
Moves all bytes in this buffer to a newly created buffer with the optionally specified size by allocating it from the given pool