com.unitech.lib.util.collections

## Class ByteQueue

- java.lang.Object
- - com.unitech.lib.util.collections.ByteQueue

-     public class ByteQueue
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ByteQueue()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `int` | `dequeue(byte[] data)`
    `int` | `dequeue(byte[] data, int length)`
    `int` | `dequeue(byte[] data, int offset, int length)`
    `int` | `enqueue(byte[] data)`
    `int` | `enqueue(byte[] data, int length)`
    `int` | `enqueue(byte[] data, int offset, int length)`
    `int` | `findKey(int key)`
    `int` | `findKey(int position, int key)`
    `int` | `findPattern(byte[] pattern)`
    `int` | `findPattern(int position, byte[] pattern)`
    `int` | `getFront()` Get the front position of the data
    `int` | `getPos(int pos)`
    `int` | `getQueueSize()`
    `int` | `getSize()` Get the byte size in the queue
    `int` | `getSize(int position)`
    `int` | `getSize(int start, int end)`
    `int` | `getTail()`
    `int` | `peek()`
    `int` | `peek(int position)`
    `byte[]` | `peek(int start, int end)`
    `void` | `remove()`
    `void` | `setFront(int front)`
    `void` | `setTail(int tail)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ByteQueue

          public ByteQueue()

  - ### Method Detail

    - #### getQueueSize

          public int getQueueSize()

    - #### getPos

          public int getPos(int pos)

    - #### getFront

          public int getFront()

      Get the front position of the data
      Returns:
        The position value of the data

    - #### setFront

          public void setFront(int front)

    - #### getTail

          public int getTail()

    - #### setTail

          public void setTail(int tail)

    - #### getSize

          public int getSize()

      Get the byte size in the queue
      Returns:
        The size of byte data in the queue

    - #### getSize

          public int getSize(int position)

    - #### getSize

          public int getSize(int start,
                             int end)

    - #### clear

          public void clear()

    - #### enqueue

          public int enqueue(byte[] data)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### enqueue

          public int enqueue(byte[] data,
                             int length)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### enqueue

          public int enqueue(byte[] data,
                             int offset,
                             int length)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### dequeue

          public int dequeue(byte[] data)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### dequeue

          public int dequeue(byte[] data,
                             int length)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### dequeue

          public int dequeue(byte[] data,
                             int offset,
                             int length)
                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### peek

          public int peek()

    - #### peek

          public int peek(int position)

    - #### peek

          public byte[] peek(int start,
                             int end)

    - #### remove

          public void remove()

    - #### findKey

          public int findKey(int key)

    - #### findKey

          public int findKey(int position,
                             int key)

    - #### findPattern

          public int findPattern(byte[] pattern)

    - #### findPattern

          public int findPattern(int position,
                                 byte[] pattern)