类 ByteQueue

java.lang.Object
com.huangjian.modbus4j.sero.util.queue.ByteQueue
所有已实现的接口:
Cloneable

public class ByteQueue extends Object implements Cloneable

ByteQueue class.

  • 构造器详细资料

    • 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 of
      引用无效
      byte
      objects.
    • ByteQueue

      public ByteQueue(byte[] b, int pos, int length)

      Constructor for ByteQueue.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      pos - a int.
      length - a int.
    • ByteQueue

      public ByteQueue(String hex)

      Constructor for ByteQueue.

      参数:
      hex - a String object.
  • 方法详细资料

    • push

      public void push(String hex)

      push.

      参数:
      hex - a String object.
    • 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

      public void read(InputStream in, int length) throws IOException

      read.

      参数:
      in - a InputStream object.
      length - a int.
      抛出:
      IOException - if any.
    • push

      public void push(byte[] b)

      push.

      参数:
      b - an array of
      引用无效
      byte
      objects.
    • push

      public void push(byte[] b, int pos, int length)

      push.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      pos - a int.
      length - a int.
    • push

      public void push(ByteQueue source)

      push.

      参数:
      source - a ByteQueue object.
    • push

      public void push(ByteQueue source, int len)

      push.

      参数:
      source - a ByteQueue object.
      len - a int.
    • push

      public void push(ByteBuffer source)

      push.

      参数:
      source - a ByteBuffer object.
    • 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 of
      引用无效
      byte
      objects.
      返回:
      a int.
    • pop

      public int pop(byte[] buf, int pos, int length)

      pop.

      参数:
      buf - an array of
      引用无效
      byte
      objects.
      pos - a int.
      length - a int.
      返回:
      a int.
    • pop

      public int pop(int length)

      pop.

      参数:
      length - a int.
      返回:
      a int.
    • popString

      public String popString(int length, Charset charset)

      popString.

      参数:
      length - a int.
      charset - a Charset object.
      返回:
      a String object.
    • popAll

      public byte[] popAll()

      popAll.

      返回:
      an array of
      引用无效
      byte
      objects.
    • write

      public void write(OutputStream out) throws IOException

      write.

      参数:
      out - a OutputStream object.
      抛出:
      IOException - if any.
    • write

      public void write(OutputStream out, int length) throws IOException

      write.

      参数:
      out - a OutputStream object.
      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
      引用无效
      byte
      objects.
    • peekAll

      public byte[] peekAll()

      peekAll.

      返回:
      an array of
      引用无效
      byte
      objects.
    • peek

      public int peek(byte[] buf)

      peek.

      参数:
      buf - an array of
      引用无效
      byte
      objects.
      返回:
      a int.
    • peek

      public int peek(byte[] buf, int pos, int length)

      peek.

      参数:
      buf - an array of
      引用无效
      byte
      objects.
      pos - 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 of
      引用无效
      byte
      objects.
      返回:
      a int.
    • indexOf

      public int indexOf(byte[] b, int start)

      indexOf.

      参数:
      b - an array of
      引用无效
      byte
      objects.
      start - a int.
      返回:
      a int.
    • size

      public int size()

      size.

      返回:
      a int.
    • clear

      public void clear()

      clear.

    • clone

      public Object clone()
      覆盖:
      clone 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • dumpQueue

      public String dumpQueue()

      dumpQueue.

      返回:
      a String object.