public class Msg
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
Msg.Type |
| Modifier and Type | Field and Description |
|---|---|
private java.nio.ByteBuffer |
buf |
static int |
COMMAND |
private byte[] |
data |
private int |
flags |
static int |
IDENTITY |
static int |
MORE |
private int |
readIndex |
static int |
SHARED |
private int |
size |
private Msg.Type |
type |
private int |
writeIndex |
| Constructor and Description |
|---|
Msg() |
Msg(byte[] src) |
Msg(java.nio.ByteBuffer src) |
Msg(int capacity) |
Msg(Msg m) |
| Modifier and Type | Method and Description |
|---|---|
java.nio.ByteBuffer |
buf() |
boolean |
check() |
byte[] |
data() |
int |
flags() |
byte |
get() |
byte |
get(int index) |
int |
getBytes(int index,
byte[] dst,
int off,
int len) |
int |
getBytes(int index,
java.nio.ByteBuffer bb,
int len) |
boolean |
hasMore() |
void |
initDelimiter() |
boolean |
isDelimiter() |
boolean |
isIdentity() |
Msg |
put(byte b) |
Msg |
put(byte[] src) |
Msg |
put(byte[] src,
int off,
int len) |
Msg |
put(java.nio.ByteBuffer src) |
Msg |
put(int index,
byte b) |
void |
resetFlags(int f) |
void |
setFlags(int flags) |
int |
size() |
java.lang.String |
toString() |
public static final int MORE
public static final int COMMAND
public static final int IDENTITY
public static final int SHARED
private int flags
private Msg.Type type
private int size
private byte[] data
private final java.nio.ByteBuffer buf
private int writeIndex
private int readIndex
public Msg()
public Msg(int capacity)
public Msg(byte[] src)
public Msg(java.nio.ByteBuffer src)
public Msg(Msg m)
public boolean isIdentity()
public boolean isDelimiter()
public boolean check()
public int flags()
public boolean hasMore()
public void setFlags(int flags)
public void initDelimiter()
public byte[] data()
public java.nio.ByteBuffer buf()
public int size()
public void resetFlags(int f)
public byte get()
public byte get(int index)
public Msg put(byte b)
public Msg put(int index, byte b)
public Msg put(byte[] src)
public Msg put(byte[] src, int off, int len)
public Msg put(java.nio.ByteBuffer src)
public int getBytes(int index,
byte[] dst,
int off,
int len)
public int getBytes(int index,
java.nio.ByteBuffer bb,
int len)
public java.lang.String toString()
toString in class java.lang.Object