类 ByteQueue
java.lang.Object
com.huangjian.modbus4j.sero.util.queue.ByteQueue
- 所有已实现的接口:
Cloneable
ByteQueue class.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidclear()clear.clone()dumpQueue.intindexOf(byte b) indexOf.intindexOf(byte[] b) indexOf.intindexOf(byte[] b, int start) indexOf.intindexOf(byte b, int start) indexOf.voidmark()mark.intpeek(byte[] buf) peek.intpeek(byte[] buf, int pos, int length) peek.bytepeek(int index) peek.byte[]peek(int index, int length) peek.byte[]peekAll()peekAll.bytepop()pop.intpop(byte[] buf) pop.intpop(byte[] buf, int pos, int length) pop.intpop(int length) pop.byte[]popAll()popAll.shortpopS2B()popS2B.intpopS4B()popS4B.popString.intpopU1B()popU1B.intpopU2B()popU2B.intpopU3B()popU3B.longpopU4B()popU4B.voidpush(byte b) push.voidpush(byte[] b) push.voidpush(byte[] b, int pos, int length) push.voidpush(int i) push.voidpush(long l) push.voidpush.voidpush.voidpush.voidpush(ByteBuffer source) push.voidpushChar(char c) pushChar.voidpushDouble(double d) pushDouble.voidpushFloat(float f) pushFloat.voidpushInt(int i) pushInt.voidpushLong(long l) pushLong.voidpushS4B(int i) Push signed 4 bytes.voidpushShort(short s) pushShort.voidpushU2B(int i) Push unsigned 2 bytes.voidpushU3B(int i) Push unsigned 3 bytes.voidpushU4B(long l) Push unsigned 4 bytes.voidread(InputStream in, int length) read.voidreset()reset.intsize()size.bytetailPop()tailPop.toString()voidwrite(OutputStream out) write.voidwrite(OutputStream out, int length) write.
-
构造器详细资料
-
ByteQueue
public ByteQueue()Constructor for ByteQueue.
-
ByteQueue
public ByteQueue(int initialLength) Constructor for ByteQueue.
- 参数:
initialLength- a int.
-
ByteQueue
public ByteQueue(byte[] b) Constructor for ByteQueue.
- 参数:
b- an array ofobjects.引用无效
byte
-
ByteQueue
public ByteQueue(byte[] b, int pos, int length) Constructor for ByteQueue.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.length- a int.
-
ByteQueue
Constructor for ByteQueue.
- 参数:
hex- aStringobject.
-
-
方法详细资料
-
push
push.
- 参数:
hex- aStringobject.
-
push
public void push(byte b) push.
- 参数:
b- a byte.
-
push
public void push(int i) push.
- 参数:
i- a int.
-
push
public void push(long l) push.
- 参数:
l- a long.
-
pushU2B
public void pushU2B(int i) Push unsigned 2 bytes.- 参数:
i- a int.
-
pushU3B
public void pushU3B(int i) Push unsigned 3 bytes.- 参数:
i- a int.
-
pushS4B
public void pushS4B(int i) Push signed 4 bytes.- 参数:
i- a int.
-
pushU4B
public void pushU4B(long l) Push unsigned 4 bytes.- 参数:
l- a long.
-
pushChar
public void pushChar(char c) pushChar.
- 参数:
c- a char.
-
pushDouble
public void pushDouble(double d) pushDouble.
- 参数:
d- a double.
-
pushFloat
public void pushFloat(float f) pushFloat.
- 参数:
f- a float.
-
pushInt
public void pushInt(int i) pushInt.
- 参数:
i- a int.
-
pushLong
public void pushLong(long l) pushLong.
- 参数:
l- a long.
-
pushShort
public void pushShort(short s) pushShort.
- 参数:
s- a short.
-
read
read.
- 参数:
in- aInputStreamobject.length- a int.- 抛出:
IOException- if any.
-
push
public void push(byte[] b) push.
- 参数:
b- an array ofobjects.引用无效
byte
-
push
public void push(byte[] b, int pos, int length) push.
- 参数:
b- an array ofobjects.引用无效
bytepos- a int.length- a int.
-
push
push.
- 参数:
source- aByteQueueobject.
-
push
push.
- 参数:
source- aByteQueueobject.len- a int.
-
push
push.
- 参数:
source- aByteBufferobject.
-
mark
public void mark()mark.
-
reset
public void reset()reset.
-
pop
public byte pop()pop.
- 返回:
- a byte.
-
popU1B
public int popU1B()popU1B.
- 返回:
- a int.
-
popU2B
public int popU2B()popU2B.
- 返回:
- a int.
-
popU3B
public int popU3B()popU3B.
- 返回:
- a int.
-
popS2B
public short popS2B()popS2B.
- 返回:
- a short.
-
popS4B
public int popS4B()popS4B.
- 返回:
- a int.
-
popU4B
public long popU4B()popU4B.
- 返回:
- a long.
-
pop
public int pop(byte[] buf) pop.
- 参数:
buf- an array ofobjects.引用无效
byte- 返回:
- a int.
-
pop
public int pop(byte[] buf, int pos, int length) pop.
- 参数:
buf- an array ofobjects.引用无效
bytepos- a int.length- a int.- 返回:
- a int.
-
pop
public int pop(int length) pop.
- 参数:
length- a int.- 返回:
- a int.
-
popString
popString.
-
popAll
public byte[] popAll()popAll.
- 返回:
- an array of
objects.
引用无效
byte
-
write
write.
- 参数:
out- aOutputStreamobject.- 抛出:
IOException- if any.
-
write
write.
- 参数:
out- aOutputStreamobject.length- a int.- 抛出:
IOException- if any.
-
tailPop
public byte tailPop()tailPop.
- 返回:
- a byte.
-
peek
public byte peek(int index) peek.
- 参数:
index- a int.- 返回:
- a byte.
-
peek
public byte[] peek(int index, int length) peek.
- 参数:
index- a int.length- a int.- 返回:
- an array of
objects.
引用无效
byte
-
peekAll
public byte[] peekAll()peekAll.
- 返回:
- an array of
objects.
引用无效
byte
-
peek
public int peek(byte[] buf) peek.
- 参数:
buf- an array ofobjects.引用无效
byte- 返回:
- a int.
-
peek
public int peek(byte[] buf, int pos, int length) peek.
- 参数:
buf- an array ofobjects.引用无效
bytepos- a int.length- a int.- 返回:
- a int.
-
indexOf
public int indexOf(byte b) indexOf.
- 参数:
b- a byte.- 返回:
- a int.
-
indexOf
public int indexOf(byte b, int start) indexOf.
- 参数:
b- a byte.start- a int.- 返回:
- a int.
-
indexOf
public int indexOf(byte[] b) indexOf.
- 参数:
b- an array ofobjects.引用无效
byte- 返回:
- a int.
-
indexOf
public int indexOf(byte[] b, int start) indexOf.
- 参数:
b- an array ofobjects.引用无效
bytestart- a int.- 返回:
- a int.
-
size
public int size()size.
- 返回:
- a int.
-
clear
public void clear()clear.
-
clone
-
toString
-
dumpQueue
dumpQueue.
- 返回:
- a
Stringobject.
-