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 ByteBuilderallocate(int cap)byte[]array()List<ByteBuffer>buffers()voidclear()intlength()voidput(byte b)voidput(byte[] bytes)voidput(byte[] bytes, int offset, int length)voidput(ByteBuffer buf)StringtoString()
-
-
-
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()
-
-