## org.flexdock.docking.drag.outline.x11
Class DataBuffer

    java.lang.Object
      org.flexdock.docking.drag.outline.x11.DataBuffer

    public class DataBuffer

extends java.lang.Object

Author:
  Christopher Butler

Field Summary
`static int` `DEFAULT_BUFFER_SIZE`

Constructor Summary
`DataBuffer()`
`DataBuffer(byte[] rawData)`
`DataBuffer(int initialBufferSize)`

Method Summary
`void` `appendByte(int data)`
`void` `appendFourBytes(int data)`
`void` `appendTwoBytes(int data)`
`static int` `decode(byte[] data)`
`static byte[]` `encode(int data, int byteCount)`
`byte[]` `getBytes()`
`DataBuffer` `getSubBuffer(int offset, int length)`
`byte[]` `getSubset(int offset, int length)`
`static int` `padLength(int len)`
`int` `readByte(int offset)`
`int` `readFourBytes(int offset)`
`int` `readTwoBytes(int offset)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEFAULT_BUFFER_SIZE

    public static final int DEFAULT_BUFFER_SIZE

See Also:
  Constant Field Values

Constructor Detail

### DataBuffer

    public DataBuffer()

### DataBuffer

    public DataBuffer(int initialBufferSize)

### DataBuffer

    public DataBuffer(byte[] rawData)

Method Detail

### appendByte

    public void appendByte(int data)

### appendTwoBytes

    public void appendTwoBytes(int data)

### appendFourBytes

    public void appendFourBytes(int data)

### getBytes

    public byte[] getBytes()

### readByte

    public int readByte(int offset)

### readTwoBytes

    public int readTwoBytes(int offset)

### readFourBytes

    public int readFourBytes(int offset)

### getSubset

    public byte[] getSubset(int offset,
                            int length)

### getSubBuffer

    public DataBuffer getSubBuffer(int offset,
                                   int length)

### decode

    public static int decode(byte[] data)

### encode

    public static byte[] encode(int data,
                                int byteCount)

### padLength

    public static int padLength(int len)