Package com.jackmeng.core.util
Class use_Buffer.buffer_Circular
java.lang.Object
com.jackmeng.core.util.use_Buffer.buffer_Circular
- Enclosing class:
- use_Buffer
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static int
calc_offset
(int len_0, int sz, int buff_len) void
drop
(int elementsCount) int
free
(int n) int
free_sz()
void
init()
void
next
(int n) int
offset()
void
opush
(byte[] data, int i, int len) boolean
overflows
(int n) int
peek
(byte[] data, int i, int len) void
int
pop
(byte[] bytes, int i, int len) int
push
(byte[] data, int i, int len) int
total_sz()
int
used_sz()
-
Field Details
-
buffer
private final byte[] buffer -
start
private int start -
sz
private int sz
-
-
Constructor Details
-
buffer_Circular
public buffer_Circular(int init_Size) -
buffer_Circular
public buffer_Circular()
-
-
Method Details
-
used_sz
public int used_sz() -
total_sz
public int total_sz() -
free_sz
public int free_sz() -
drop
public void drop(int elementsCount) -
push
public int push(byte[] data, int i, int len) -
opush
public void opush(byte[] data, int i, int len) -
init
public void init() -
calc_offset
private static int calc_offset(int len_0, int sz, int buff_len) -
offset
public int offset() -
peek
-
peek
public int peek(byte[] data, int i, int len) -
pop
public int pop(byte[] bytes, int i, int len) -
overflows
public boolean overflows(int n) -
next
public void next(int n) -
free
public int free(int n)
-