public final class Bytes
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Bytes |
allocate() |
static Bytes |
allocate(int capacity) |
byte[] |
array() |
byte[] |
array(int offset)
Returns byte array representation of class, starting from specified position.
|
Bytes |
clear() |
Bytes |
flip() |
byte |
getByte() |
byte |
getByte(int index) |
byte[] |
getBytes() |
byte[] |
getBytes(int length) |
byte[] |
getBytes(int offset,
int length) |
int |
limit() |
int |
position() |
Bytes |
position(int position) |
Bytes |
put(byte value) |
Bytes |
put(byte[] bytes) |
Bytes |
put(int index,
byte value) |
Bytes |
put(int index,
byte[] bytes) |
int |
remaining() |
static Bytes |
wrap(byte[] bytes) |
static Bytes |
wrap(java.nio.ByteBuffer buffer) |
public static Bytes wrap(@NonNull byte[] bytes)
public static Bytes wrap(@NonNull java.nio.ByteBuffer buffer)
public static Bytes allocate()
public static Bytes allocate(int capacity)
public Bytes put(byte value)
public Bytes put(int index, byte value)
public Bytes put(@NonNull byte[] bytes)
public Bytes put(int index, @NonNull byte[] bytes)
public byte getByte()
public byte getByte(int index)
public byte[] getBytes()
public byte[] getBytes(int length)
public byte[] getBytes(int offset,
int length)
public byte[] array()
public byte[] array(int offset)
offset - start positionjava.lang.IndexOutOfBoundsException - if offset is lower zero or larger the limitpublic int limit()
public int remaining()
public int position()
public Bytes position(int position)
public Bytes clear()
public Bytes flip()
Copyright © 2018 Appulse. All rights reserved.