test_class.declarator: logger = LoggerFactory.getLogger(ByteBufferTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ByteBufferTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.declarator: TEST_BYTES1 = {'H','E','L','L','O',' ','W','O','R','L','D'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_BYTES1 = {'H','E','L','L','O',' ','W','O','R','L','D'};
test_class.type: byte[]
test_class.var_name: TEST_BYTES1
test_class.declarator: TEST_HELLO = {'H','E','L','L','O'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_HELLO = {'H','E','L','L','O'};
test_class.type: byte[]
test_class.var_name: TEST_HELLO
test_class.declarator: TEST_H = {'H'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_H = {'H'};
test_class.type: byte[]
test_class.var_name: TEST_H
test_class.declarator: TEST_WORLD = {'W','O','R','L','D'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_WORLD = {'W','O','R','L','D'};
test_class.type: byte[]
test_class.var_name: TEST_WORLD
test_class.declarator: TEST_W = {'W'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_W = {'W'};
test_class.type: byte[]
test_class.var_name: TEST_W
test_class.declarator: TEST_D = {'D'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_D = {'D'};
test_class.type: byte[]
test_class.var_name: TEST_D
test_class.declarator: TEST_L = {'L'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_L = {'L'};
test_class.type: byte[]
test_class.var_name: TEST_L
test_class.declarator: TEST_LL = {'L','L'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_LL = {'L','L'};
test_class.type: byte[]
test_class.var_name: TEST_LL
test_class.declarator: TEST_SPACE = {' '}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_SPACE = {' '};
test_class.type: byte[]
test_class.var_name: TEST_SPACE
test_class.declarator: TEST_SPACEH = {' ','H'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_SPACEH = {' ','H'};
test_class.type: byte[]
test_class.var_name: TEST_SPACEH
test_class.declarator: TEST_SPACEW = {' ','W'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_SPACEW = {' ','W'};
test_class.type: byte[]
test_class.var_name: TEST_SPACEW
test_class.declarator: TEST_BYTES2 = {'C','A','A','A','A','A','A','A','B','A','A','A','B','B','B','B','B','B'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_BYTES2 = {'C','A','A','A','A','A','A','A','B','A','A','A','B','B','B','B','B','B'};
test_class.type: byte[]
test_class.var_name: TEST_BYTES2
test_class.declarator: TEST_AA = {'A','A'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_AA = {'A','A'};
test_class.type: byte[]
test_class.var_name: TEST_AA
test_class.declarator: TEST_AB = {'A','B'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_AB = {'A','B'};
test_class.type: byte[]
test_class.var_name: TEST_AB
test_class.declarator: TEST_BB = {'B','B'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_BB = {'B','B'};
test_class.type: byte[]
test_class.var_name: TEST_BB
test_class.declarator: TEST_C = {'C'}
test_class.modifier: private static final
test_class.original_string: private static final byte[] TEST_C = {'C'};
test_class.type: byte[]
test_class.var_name: TEST_C
test_class.declarator: COMMA = {','}
test_class.modifier: private static final
test_class.original_string: private static final byte[] COMMA = {','};
test_class.type: byte[]
test_class.var_name: COMMA
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/ByteBufferTest.java
test_class.identifier: ByteBufferTest
test_case.body: @Test(expected=IllegalArgumentException.class)
      public void addWithArrayWithLargeOffset() throws BufferException {
          ByteBuffer buffer = createCircledByteBuffer(TEST_BYTES1.length);
          // most difficult case where the offset is off by 1
          buffer.add(TEST_BYTES1, TEST_BYTES1.length, 0);
      }
test_case.class_method_signature: ByteBufferTest.addWithArrayWithLargeOffset()
test_case.full_signature: @Test(expected=IllegalArgumentException.class) public void addWithArrayWithLargeOffset()
test_case.identifier: addWithArrayWithLargeOffset
test_case.invocations: createCircledByteBuffer add
test_case.modifiers: @Test(expected=IllegalArgumentException.class) public
test_case.parameters: ()
test_case.return: void
test_case.signature: void addWithArrayWithLargeOffset()
focal_class.declarator: logger = LoggerFactory.getLogger(ByteBuffer.class)
focal_class.modifier: private final static
focal_class.original_string: private final static Logger logger = LoggerFactory.getLogger(ByteBuffer.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: DEFAULT_BUFFER_CAPACITY = 1023
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_BUFFER_CAPACITY = 1023;
focal_class.type: int
focal_class.var_name: DEFAULT_BUFFER_CAPACITY
focal_class.declarator: MAXIMUM_INTEGER = 2147483647
focal_class.modifier: private static final
focal_class.original_string: private static final int MAXIMUM_INTEGER = 2147483647;
focal_class.type: int
focal_class.var_name: MAXIMUM_INTEGER
focal_class.declarator: buffer
focal_class.modifier: private
focal_class.original_string: private byte[] buffer;
focal_class.type: byte[]
focal_class.var_name: buffer
focal_class.declarator: currentReadPosition
focal_class.modifier: private
focal_class.original_string: private int currentReadPosition;
focal_class.type: int
focal_class.var_name: currentReadPosition
focal_class.declarator: currentWritePosition
focal_class.modifier: private
focal_class.original_string: private int currentWritePosition;
focal_class.type: int
focal_class.var_name: currentWritePosition
focal_class.declarator: currentBufferSize
focal_class.modifier: private
focal_class.original_string: private int currentBufferSize;
focal_class.type: int
focal_class.var_name: currentBufferSize
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteBuffer.java
focal_class.identifier: ByteBuffer
focal_class.class_method_signature: ByteBuffer.ByteBuffer()
focal_class.full_signature: public  ByteBuffer()
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  ByteBuffer()
focal_class.class_method_signature: ByteBuffer.ByteBuffer(int capacity)
focal_class.full_signature: public  ByteBuffer(int capacity)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (int capacity)
focal_class.signature:  ByteBuffer(int capacity)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(byte[] bytes)
focal_class.full_signature: public  ByteBuffer(byte[] bytes)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.signature:  ByteBuffer(byte[] bytes)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(byte[] bytes, int capacity)
focal_class.full_signature: public  ByteBuffer(byte[] bytes, int capacity)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, int capacity)
focal_class.signature:  ByteBuffer(byte[] bytes, int capacity)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(byte[] bytes, int offset, int length)
focal_class.full_signature: public  ByteBuffer(byte[] bytes, int offset, int length)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.signature:  ByteBuffer(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(byte[] bytes, int offset, int length, int capacity)
focal_class.full_signature: public  ByteBuffer(byte[] bytes, int offset, int length, int capacity)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, int offset, int length, int capacity)
focal_class.signature:  ByteBuffer(byte[] bytes, int offset, int length, int capacity)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(String string0)
focal_class.full_signature: public  ByteBuffer(String string0)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (String string0)
focal_class.signature:  ByteBuffer(String string0)
focal_class.class_method_signature: ByteBuffer.ByteBuffer(String string0, int capacity)
focal_class.full_signature: public  ByteBuffer(String string0, int capacity)
focal_class.identifier: ByteBuffer
focal_class.modifiers: public
focal_class.parameters: (String string0, int capacity)
focal_class.signature:  ByteBuffer(String string0, int capacity)
focal_class.class_method_signature: ByteBuffer.circularByteBufferInitializer(int bufferCapacity, int bufferSize, int readPosition, int writePosition)
focal_class.full_signature: private void circularByteBufferInitializer(int bufferCapacity, int bufferSize, int readPosition, int writePosition)
focal_class.identifier: circularByteBufferInitializer
focal_class.modifiers: private
focal_class.parameters: (int bufferCapacity, int bufferSize, int readPosition, int writePosition)
focal_class.return: void
focal_class.signature: void circularByteBufferInitializer(int bufferCapacity, int bufferSize, int readPosition, int writePosition)
focal_class.class_method_signature: ByteBuffer.modularExponentation(int a, int b, int n)
focal_class.full_signature: private int modularExponentation(int a, int b, int n)
focal_class.identifier: modularExponentation
focal_class.modifiers: private
focal_class.parameters: (int a, int b, int n)
focal_class.return: int
focal_class.signature: int modularExponentation(int a, int b, int n)
focal_class.class_method_signature: ByteBuffer.size()
focal_class.full_signature: public int size()
focal_class.identifier: size
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int size()
focal_class.class_method_signature: ByteBuffer.capacity()
focal_class.full_signature: public int capacity()
focal_class.identifier: capacity
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int capacity()
focal_class.class_method_signature: ByteBuffer.free()
focal_class.full_signature: public int free()
focal_class.identifier: free
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int free()
focal_class.class_method_signature: ByteBuffer.isFree(int count)
focal_class.full_signature: public boolean isFree(int count)
focal_class.identifier: isFree
focal_class.modifiers: public
focal_class.parameters: (int count)
focal_class.return: boolean
focal_class.signature: boolean isFree(int count)
focal_class.class_method_signature: ByteBuffer.isEmpty()
focal_class.full_signature: public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: ByteBuffer.isFull()
focal_class.full_signature: public boolean isFull()
focal_class.identifier: isFull
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isFull()
focal_class.class_method_signature: ByteBuffer.clear()
focal_class.full_signature: public void clear()
focal_class.identifier: clear
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: ByteBuffer.add(byte b)
focal_class.full_signature: public void add(byte b)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (byte b)
focal_class.return: void
focal_class.signature: void add(byte b)
focal_class.class_method_signature: ByteBuffer.add(byte[] bytes)
focal_class.full_signature: public void add(byte[] bytes)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: void
focal_class.signature: void add(byte[] bytes)
focal_class.class_method_signature: ByteBuffer.checkOffsetLength(int bytesLength, int offset, int length)
focal_class.full_signature: static protected void checkOffsetLength(int bytesLength, int offset, int length)
focal_class.identifier: checkOffsetLength
focal_class.modifiers: static protected
focal_class.parameters: (int bytesLength, int offset, int length)
focal_class.return: void
focal_class.signature: void checkOffsetLength(int bytesLength, int offset, int length)
focal_class.class_method_signature: ByteBuffer.add(byte[] bytes, int offset, int length)
focal_class.full_signature: public void add(byte[] bytes, int offset, int length)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: void
focal_class.signature: void add(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteBuffer.delete(int count)
focal_class.full_signature: public void delete(int count)
focal_class.identifier: delete
focal_class.modifiers: public
focal_class.parameters: (int count)
focal_class.return: void
focal_class.signature: void delete(int count)
focal_class.class_method_signature: ByteBuffer.remove()
focal_class.full_signature: public byte remove()
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte
focal_class.signature: byte remove()
focal_class.class_method_signature: ByteBuffer.remove(int count)
focal_class.full_signature: public byte[] remove(int count)
focal_class.identifier: remove
focal_class.modifiers: public
focal_class.parameters: (int count)
focal_class.return: byte[]
focal_class.signature: byte[] remove(int count)
focal_class.class_method_signature: ByteBuffer.occurrences(byte b)
focal_class.full_signature: public int occurrences(byte b)
focal_class.identifier: occurrences
focal_class.modifiers: public
focal_class.parameters: (byte b)
focal_class.return: int
focal_class.signature: int occurrences(byte b)
focal_class.class_method_signature: ByteBuffer.occurrences(byte[] bytes)
focal_class.full_signature: public int occurrences(byte[] bytes)
focal_class.identifier: occurrences
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: int
focal_class.signature: int occurrences(byte[] bytes)
focal_class.class_method_signature: ByteBuffer.copy()
focal_class.full_signature: public ByteBuffer copy()
focal_class.identifier: copy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer copy()
focal_class.class_method_signature: ByteBuffer.copy(int offset, int length)
focal_class.full_signature: public ByteBuffer copy(int offset, int length)
focal_class.identifier: copy
focal_class.modifiers: public
focal_class.parameters: (int offset, int length)
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer copy(int offset, int length)
focal_class.class_method_signature: ByteBuffer.copy(int offset, int length, int capacity)
focal_class.full_signature: public ByteBuffer copy(int offset, int length, int capacity)
focal_class.identifier: copy
focal_class.modifiers: public
focal_class.parameters: (int offset, int length, int capacity)
focal_class.return: ByteBuffer
focal_class.signature: ByteBuffer copy(int offset, int length, int capacity)
focal_class.class_method_signature: ByteBuffer.getUnchecked(int index)
focal_class.full_signature: private byte getUnchecked(int index)
focal_class.identifier: getUnchecked
focal_class.modifiers: private
focal_class.parameters: (int index)
focal_class.return: byte
focal_class.signature: byte getUnchecked(int index)
focal_class.class_method_signature: ByteBuffer.get(int index)
focal_class.full_signature: public byte get(int index)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (int index)
focal_class.return: byte
focal_class.signature: byte get(int index)
focal_class.class_method_signature: ByteBuffer.toArray()
focal_class.full_signature: public byte[] toArray()
focal_class.identifier: toArray
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] toArray()
focal_class.class_method_signature: ByteBuffer.toArray(int offset, int length)
focal_class.full_signature: public byte[] toArray(int offset, int length)
focal_class.identifier: toArray
focal_class.modifiers: public
focal_class.parameters: (int offset, int length)
focal_class.return: byte[]
focal_class.signature: byte[] toArray(int offset, int length)
focal_class.class_method_signature: ByteBuffer.toArray(int offset, int length, int capacity)
focal_class.full_signature: public byte[] toArray(int offset, int length, int capacity)
focal_class.identifier: toArray
focal_class.modifiers: public
focal_class.parameters: (int offset, int length, int capacity)
focal_class.return: byte[]
focal_class.signature: byte[] toArray(int offset, int length, int capacity)
focal_class.class_method_signature: ByteBuffer.toArray(int offset, int length, byte[] targetBuffer, int targetOffset)
focal_class.full_signature: public void toArray(int offset, int length, byte[] targetBuffer, int targetOffset)
focal_class.identifier: toArray
focal_class.modifiers: public
focal_class.parameters: (int offset, int length, byte[] targetBuffer, int targetOffset)
focal_class.return: void
focal_class.signature: void toArray(int offset, int length, byte[] targetBuffer, int targetOffset)
focal_class.class_method_signature: ByteBuffer.startsWith(byte[] prefix)
focal_class.full_signature: public boolean startsWith(byte[] prefix)
focal_class.identifier: startsWith
focal_class.modifiers: public
focal_class.parameters: (byte[] prefix)
focal_class.return: boolean
focal_class.signature: boolean startsWith(byte[] prefix)
focal_class.class_method_signature: ByteBuffer.endsWith(byte[] prefix)
focal_class.full_signature: public boolean endsWith(byte[] prefix)
focal_class.identifier: endsWith
focal_class.modifiers: public
focal_class.parameters: (byte[] prefix)
focal_class.return: boolean
focal_class.signature: boolean endsWith(byte[] prefix)
focal_class.class_method_signature: ByteBuffer.indexOf(byte[] bytes)
focal_class.full_signature: public int indexOf(byte[] bytes)
focal_class.identifier: indexOf
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: int
focal_class.signature: int indexOf(byte[] bytes)
focal_class.class_method_signature: ByteBuffer.indexOf(byte[] bytes, int offset)
focal_class.full_signature: public int indexOf(byte[] bytes, int offset)
focal_class.identifier: indexOf
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes, int offset)
focal_class.return: int
focal_class.signature: int indexOf(byte[] bytes, int offset)
focal_class.class_method_signature: ByteBuffer.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: ByteBuffer.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: ByteBuffer.equals(byte[] bytes)
focal_class.full_signature: public boolean equals(byte[] bytes)
focal_class.identifier: equals
focal_class.modifiers: public
focal_class.parameters: (byte[] bytes)
focal_class.return: boolean
focal_class.signature: boolean equals(byte[] bytes)
focal_class.class_method_signature: ByteBuffer.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: ByteBuffer.toHexString()
focal_class.full_signature: public String toHexString()
focal_class.identifier: toHexString
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toHexString()
focal_class.class_method_signature: ByteBuffer.toHexString(int offset, int length)
focal_class.full_signature: public String toHexString(int offset, int length)
focal_class.identifier: toHexString
focal_class.modifiers: public
focal_class.parameters: (int offset, int length)
focal_class.return: String
focal_class.signature: String toHexString(int offset, int length)
focal_method.body: public void add(byte b) throws BufferIsFullException {
          if (isFull()) {
              throw new BufferIsFullException("Buffer is full and has reached maximum capacity (" + capacity() + ")");
          }
  
          // buffer is not full
          this.buffer[this.currentWritePosition] = b;
          this.currentWritePosition = (this.currentWritePosition + 1) % this.buffer.length;
          this.currentBufferSize += 1;
      }
focal_method.class_method_signature: ByteBuffer.add(byte b)
focal_method.full_signature: public void add(byte b)
focal_method.identifier: add
focal_method.invocations: isFull capacity
focal_method.modifiers: public
focal_method.parameters: (byte b)
focal_method.return: void
focal_method.signature: void add(byte b)