test_class.declarator: logger = LoggerFactory.getLogger(ByteArrayUtilTest.class)
test_class.modifier: private static final
test_class.original_string: private static final Logger logger = LoggerFactory.getLogger(ByteArrayUtilTest.class);
test_class.type: Logger
test_class.var_name: logger
test_class.file: ch-commons-util/src/test/java/com/cloudhopper/commons/util/ByteArrayUtilTest.java
test_class.identifier: ByteArrayUtilTest
test_case.body: @Test
      public void toUnsignedByte() throws Exception {
          try {
              ByteArrayUtil.toUnsignedByte(null);
              Assert.fail();
          } catch (IllegalArgumentException e) {
              // correct behavior
          }
          Assert.assertEquals((short)0x12, ByteArrayUtil.toUnsignedByte(new byte[] { (byte)0x12 }));
          Assert.assertEquals((short)0xFF, ByteArrayUtil.toUnsignedByte(new byte[] { (byte)0x12, (byte)0xFF, (byte)0x56 }, 1, 1));
          Assert.assertEquals((short)240, ByteArrayUtil.toUnsignedByte(new byte[] { (byte)0xF0 }));
          Assert.assertEquals((short)240, ByteArrayUtil.toUnsignedByte(new byte[] { (byte)0x12, (byte)0xF0 }, 1, 1));
      }
test_case.class_method_signature: ByteArrayUtilTest.toUnsignedByte()
test_case.full_signature: @Test public void toUnsignedByte()
test_case.identifier: toUnsignedByte
test_case.invocations: toUnsignedByte fail assertEquals toUnsignedByte assertEquals toUnsignedByte assertEquals toUnsignedByte assertEquals toUnsignedByte
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void toUnsignedByte()
focal_class.file: ch-commons-util/src/main/java/com/cloudhopper/commons/util/ByteArrayUtil.java
focal_class.identifier: ByteArrayUtil
focal_class.class_method_signature: ByteArrayUtil.checkBytesNotNull(byte[] bytes)
focal_class.full_signature: protected static void checkBytesNotNull(byte[] bytes)
focal_class.identifier: checkBytesNotNull
focal_class.modifiers: protected static
focal_class.parameters: (byte[] bytes)
focal_class.return: void
focal_class.signature: void checkBytesNotNull(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.checkBytes(byte[] bytes, int offset, int length, int expectedLength)
focal_class.full_signature: protected static void checkBytes(byte[] bytes, int offset, int length, int expectedLength)
focal_class.identifier: checkBytes
focal_class.modifiers: protected static
focal_class.parameters: (byte[] bytes, int offset, int length, int expectedLength)
focal_class.return: void
focal_class.signature: void checkBytes(byte[] bytes, int offset, int length, int expectedLength)
focal_class.class_method_signature: ByteArrayUtil.toByteArray(byte value)
focal_class.full_signature: public static byte[] toByteArray(byte value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (byte value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(byte value)
focal_class.class_method_signature: ByteArrayUtil.toByteArray(short value)
focal_class.full_signature: public static byte[] toByteArray(short value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (short value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(short value)
focal_class.class_method_signature: ByteArrayUtil.toByteArray(int value)
focal_class.full_signature: public static byte[] toByteArray(int value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (int value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(int value)
focal_class.class_method_signature: ByteArrayUtil.toByteArray(long value)
focal_class.full_signature: public static byte[] toByteArray(long value)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (long value)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(long value)
focal_class.class_method_signature: ByteArrayUtil.toByte(byte[] bytes)
focal_class.full_signature: public static byte toByte(byte[] bytes)
focal_class.identifier: toByte
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: byte
focal_class.signature: byte toByte(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toByte(byte[] bytes, int offset, int length)
focal_class.full_signature: public static byte toByte(byte[] bytes, int offset, int length)
focal_class.identifier: toByte
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: byte
focal_class.signature: byte toByte(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedByte(byte[] bytes)
focal_class.full_signature: public static short toUnsignedByte(byte[] bytes)
focal_class.identifier: toUnsignedByte
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: short
focal_class.signature: short toUnsignedByte(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedByte(byte[] bytes, int offset, int length)
focal_class.full_signature: public static short toUnsignedByte(byte[] bytes, int offset, int length)
focal_class.identifier: toUnsignedByte
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: short
focal_class.signature: short toUnsignedByte(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toShort(byte[] bytes)
focal_class.full_signature: public static short toShort(byte[] bytes)
focal_class.identifier: toShort
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: short
focal_class.signature: short toShort(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toShort(byte[] bytes, int offset, int length)
focal_class.full_signature: public static short toShort(byte[] bytes, int offset, int length)
focal_class.identifier: toShort
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: short
focal_class.signature: short toShort(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedShort(byte[] bytes)
focal_class.full_signature: public static int toUnsignedShort(byte[] bytes)
focal_class.identifier: toUnsignedShort
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: int
focal_class.signature: int toUnsignedShort(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedShort(byte[] bytes, int offset, int length)
focal_class.full_signature: public static int toUnsignedShort(byte[] bytes, int offset, int length)
focal_class.identifier: toUnsignedShort
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: int
focal_class.signature: int toUnsignedShort(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toInt(byte[] bytes)
focal_class.full_signature: public static int toInt(byte[] bytes)
focal_class.identifier: toInt
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: int
focal_class.signature: int toInt(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toInt(byte[] bytes, int offset, int length)
focal_class.full_signature: public static int toInt(byte[] bytes, int offset, int length)
focal_class.identifier: toInt
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: int
focal_class.signature: int toInt(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedInt(byte[] bytes)
focal_class.full_signature: public static long toUnsignedInt(byte[] bytes)
focal_class.identifier: toUnsignedInt
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: long
focal_class.signature: long toUnsignedInt(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toUnsignedInt(byte[] bytes, int offset, int length)
focal_class.full_signature: public static long toUnsignedInt(byte[] bytes, int offset, int length)
focal_class.identifier: toUnsignedInt
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: long
focal_class.signature: long toUnsignedInt(byte[] bytes, int offset, int length)
focal_class.class_method_signature: ByteArrayUtil.toLong(byte[] bytes)
focal_class.full_signature: public static long toLong(byte[] bytes)
focal_class.identifier: toLong
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes)
focal_class.return: long
focal_class.signature: long toLong(byte[] bytes)
focal_class.class_method_signature: ByteArrayUtil.toLong(byte[] bytes, int offset, int length)
focal_class.full_signature: public static long toLong(byte[] bytes, int offset, int length)
focal_class.identifier: toLong
focal_class.modifiers: public static
focal_class.parameters: (byte[] bytes, int offset, int length)
focal_class.return: long
focal_class.signature: long toLong(byte[] bytes, int offset, int length)
focal_method.body: public static short toUnsignedByte(byte[] bytes) {
          checkBytesNotNull(bytes);
          return toUnsignedByte(bytes, 0, bytes.length);
      }
focal_method.class_method_signature: ByteArrayUtil.toUnsignedByte(byte[] bytes)
focal_method.full_signature: public static short toUnsignedByte(byte[] bytes)
focal_method.identifier: toUnsignedByte
focal_method.invocations: checkBytesNotNull toUnsignedByte
focal_method.modifiers: public static
focal_method.parameters: (byte[] bytes)
focal_method.return: short
focal_method.signature: short toUnsignedByte(byte[] bytes)