Class ByteBuilder
- java.lang.Object
-
- com.moilioncircle.redis.replicator.util.ByteBuilder
-
public class ByteBuilder extends Object
- Since:
- 2.1.0
- Author:
- Leon Chen
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ByteBuilder
allocate(int cap)
byte[]
array()
List<ByteBuffer>
buffers()
void
clear()
int
length()
void
put(byte b)
void
put(byte[] bytes)
void
put(byte[] bytes, int offset, int length)
void
put(ByteBuffer buf)
String
toString()
-
-
-
Method Detail
-
allocate
public static ByteBuilder allocate(int cap)
-
put
public void put(byte b)
-
put
public void put(byte[] bytes)
- Parameters:
bytes
- bytes- Since:
- 3.5.5
-
put
public void put(byte[] bytes, int offset, int length)
- Parameters:
bytes
- bytesoffset
- offsetlength
- length- Since:
- 3.5.5
-
put
public void put(ByteBuffer buf)
- Parameters:
buf
- buf- Since:
- 3.5.5
-
length
public int length()
-
array
public byte[] array()
-
buffers
public List<ByteBuffer> buffers()
- Returns:
- list buffers
- Since:
- 3.5.5
-
clear
public void clear()
-
-