@Test public void testParseInt() { int int1 = 0; byte[] bytes1 = Double.toString(int1).getBytes(); assertEquals(int1, Bytes.parseInt(bytes1, 0, bytes1.length)); int int2 = -7; byte[] bytes2 = Double.toString(int2).getBytes(); assertEquals(int2, Bytes.parseInt(bytes2, 0, bytes2.length)); int int3 = +128; byte[] bytes3 = Double.toString(int3).getBytes(); assertEquals(int3, Bytes.parseInt(bytes3, 0, bytes3.length)); int int4 = 4; byte[] bytes4 = Double.toString(int4).getBytes(); assertEquals(int4, Bytes.parseInt(bytes4, 0, bytes4.length)); byte[] bytes5 = "0123-456789".getBytes(); assertEquals(-456, Bytes.parseInt(bytes5, 4, 4)); }
public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }
Bytes { public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); } }
Bytes { public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }  }
Bytes { public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }  static byte [] readByteArray(final DataInput in); static byte [] readByteArrayThrowsRuntime(final DataInput in); static void writeByteArray(final DataOutput out, final byte [] b); static void writeByteArray(final DataOutput out, final byte [] b,
      final int offset, final int length); static int writeByteArray(final byte [] tgt, final int tgtOffset,
      final byte [] src, final int srcOffset, final int srcLength); static int putBytes(byte[] tgtBytes, int tgtOffset, byte[] srcBytes,
      int srcOffset, int srcLength); static int putByte(byte[] bytes, int offset, byte b); static byte[] toBytes(ByteBuffer bb); static String toString(final byte [] b); static String toString(final byte [] b1,
                                String sep,
                                final byte [] b2); static String toString(final byte [] b, int off, int len); static String toStringBinary(final byte [] b); static String toStringBinary(ByteBuffer buf); static String toStringBinary(final byte [] b, int off, int len); static byte toBinaryFromHex(byte ch); static byte [] toBytesBinary(String in); static byte[] toBytes(String s); static byte[] toASCIIBytes(char[] chars); static byte [] toBytes(final boolean b); static boolean toBoolean(final byte [] b); static byte[] toBytes(long val); static long toLong(byte[] bytes); static long toLong(byte[] bytes, int offset); static long toLong(byte[] bytes, int offset, final int length); static int putLong(byte[] bytes, int offset, long val); static float toFloat(byte [] bytes); static float toFloat(byte [] bytes, int offset); static int putFloat(byte [] bytes, int offset, float f); static byte [] toBytes(final float f); static double toDouble(final byte [] bytes); static double toDouble(final byte [] bytes, final int offset); static int putDouble(byte [] bytes, int offset, double d); static byte [] toBytes(final double d); static byte[] toBytes(int val); static int toInt(byte[] bytes); static int toInt(byte[] bytes, int offset); static int toInt(byte[] bytes, int offset, final int length); static int putInt(byte[] bytes, int offset, int val); static byte[] toBytes(short val); static short toShort(byte[] bytes); static short toShort(byte[] bytes, int offset); static short toShort(byte[] bytes, int offset, final int length); static byte[] getBytes(ByteBuffer buf); static int putShort(byte[] bytes, int offset, short val); static byte[] toBytes(BigDecimal val); static BigDecimal toBigDecimal(byte[] bytes); static BigDecimal toBigDecimal(byte[] bytes, int offset); static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length); static int putBigDecimal(byte[] bytes, int offset, BigDecimal val); static byte [] vintToBytes(final long vint); static byte[] vlongToBytes(long n); static long bytesToVint(final byte [] buffer); static long readVLong(final byte [] buffer, final int offset); static int compareTo(final byte [] left, final byte [] right); static int compareTo(byte[] buffer1, int offset1, int length1,
      byte[] buffer2, int offset2, int length2); static boolean equals(final byte [] left, final byte [] right); static boolean equals(final byte[] left, int leftOffset, int leftLen,
                               final byte[] right, int rightOffset, int rightLen); static boolean startsWith(byte[] bytes, byte[] prefix); static int hashCode(final byte [] b); static int hashCode(final byte [] b, final int length); static Integer mapKey(final byte [] b); static Integer mapKey(final byte [] b, final int length); static byte [] add(final byte [] a, final byte [] b); static byte [] add(final byte [] a, final byte [] b, final byte [] c); static byte [] head(final byte [] a, final int length); static byte [] tail(final byte [] a, final int length); static byte [] padHead(final byte [] a, final int length); static byte [] padTail(final byte [] a, final int length); static byte [][] split(final byte [] a, final byte [] b, final int num); static byte[][] splitPreserveAllTokens(byte[] str, char separatorChar, int[] target); static byte[][] splitPreserveAllTokens(byte[] str, int offset, int length, char separatorChar, int[] target); static byte[][] splitPreserveAllTokens(byte[] str, char separatorChar); static byte[][] splitPreserveAllTokens(byte[] str, int length, char separatorChar); static Iterable<byte[]> iterateOnSplits(
      final byte[] a, final byte[]b, final int num); static byte [][] toByteArrays(final String [] t); static byte [][] toByteArrays(final String column); static byte [][] toByteArrays(final byte [] column); static int binarySearch(byte [][]arr, byte []key, int offset,
      int length, RawComparator<byte []> comparator); static byte [] incrementBytes(byte[] value, long amount); static void writeStringFixedSize(final DataOutput out, String s,
      int size); static String readStringFixedSize(final DataInput in, int size); static int readFully(InputStream is, byte[] buffer, int offset, int length); static void skipFully(DataInput in, int len); static int parseInt(byte[] bytes, int start, int length); static int parseInt(byte[] bytes, int start, int length, int radix); static double parseDouble(byte[] bytes, int start, int length); }
Bytes { public static int parseInt(byte[] bytes, int start, int length) { return parseInt(bytes, start, length, 10); }  static byte [] readByteArray(final DataInput in); static byte [] readByteArrayThrowsRuntime(final DataInput in); static void writeByteArray(final DataOutput out, final byte [] b); static void writeByteArray(final DataOutput out, final byte [] b,
      final int offset, final int length); static int writeByteArray(final byte [] tgt, final int tgtOffset,
      final byte [] src, final int srcOffset, final int srcLength); static int putBytes(byte[] tgtBytes, int tgtOffset, byte[] srcBytes,
      int srcOffset, int srcLength); static int putByte(byte[] bytes, int offset, byte b); static byte[] toBytes(ByteBuffer bb); static String toString(final byte [] b); static String toString(final byte [] b1,
                                String sep,
                                final byte [] b2); static String toString(final byte [] b, int off, int len); static String toStringBinary(final byte [] b); static String toStringBinary(ByteBuffer buf); static String toStringBinary(final byte [] b, int off, int len); static byte toBinaryFromHex(byte ch); static byte [] toBytesBinary(String in); static byte[] toBytes(String s); static byte[] toASCIIBytes(char[] chars); static byte [] toBytes(final boolean b); static boolean toBoolean(final byte [] b); static byte[] toBytes(long val); static long toLong(byte[] bytes); static long toLong(byte[] bytes, int offset); static long toLong(byte[] bytes, int offset, final int length); static int putLong(byte[] bytes, int offset, long val); static float toFloat(byte [] bytes); static float toFloat(byte [] bytes, int offset); static int putFloat(byte [] bytes, int offset, float f); static byte [] toBytes(final float f); static double toDouble(final byte [] bytes); static double toDouble(final byte [] bytes, final int offset); static int putDouble(byte [] bytes, int offset, double d); static byte [] toBytes(final double d); static byte[] toBytes(int val); static int toInt(byte[] bytes); static int toInt(byte[] bytes, int offset); static int toInt(byte[] bytes, int offset, final int length); static int putInt(byte[] bytes, int offset, int val); static byte[] toBytes(short val); static short toShort(byte[] bytes); static short toShort(byte[] bytes, int offset); static short toShort(byte[] bytes, int offset, final int length); static byte[] getBytes(ByteBuffer buf); static int putShort(byte[] bytes, int offset, short val); static byte[] toBytes(BigDecimal val); static BigDecimal toBigDecimal(byte[] bytes); static BigDecimal toBigDecimal(byte[] bytes, int offset); static BigDecimal toBigDecimal(byte[] bytes, int offset, final int length); static int putBigDecimal(byte[] bytes, int offset, BigDecimal val); static byte [] vintToBytes(final long vint); static byte[] vlongToBytes(long n); static long bytesToVint(final byte [] buffer); static long readVLong(final byte [] buffer, final int offset); static int compareTo(final byte [] left, final byte [] right); static int compareTo(byte[] buffer1, int offset1, int length1,
      byte[] buffer2, int offset2, int length2); static boolean equals(final byte [] left, final byte [] right); static boolean equals(final byte[] left, int leftOffset, int leftLen,
                               final byte[] right, int rightOffset, int rightLen); static boolean startsWith(byte[] bytes, byte[] prefix); static int hashCode(final byte [] b); static int hashCode(final byte [] b, final int length); static Integer mapKey(final byte [] b); static Integer mapKey(final byte [] b, final int length); static byte [] add(final byte [] a, final byte [] b); static byte [] add(final byte [] a, final byte [] b, final byte [] c); static byte [] head(final byte [] a, final int length); static byte [] tail(final byte [] a, final int length); static byte [] padHead(final byte [] a, final int length); static byte [] padTail(final byte [] a, final int length); static byte [][] split(final byte [] a, final byte [] b, final int num); static byte[][] splitPreserveAllTokens(byte[] str, char separatorChar, int[] target); static byte[][] splitPreserveAllTokens(byte[] str, int offset, int length, char separatorChar, int[] target); static byte[][] splitPreserveAllTokens(byte[] str, char separatorChar); static byte[][] splitPreserveAllTokens(byte[] str, int length, char separatorChar); static Iterable<byte[]> iterateOnSplits(
      final byte[] a, final byte[]b, final int num); static byte [][] toByteArrays(final String [] t); static byte [][] toByteArrays(final String column); static byte [][] toByteArrays(final byte [] column); static int binarySearch(byte [][]arr, byte []key, int offset,
      int length, RawComparator<byte []> comparator); static byte [] incrementBytes(byte[] value, long amount); static void writeStringFixedSize(final DataOutput out, String s,
      int size); static String readStringFixedSize(final DataInput in, int size); static int readFully(InputStream is, byte[] buffer, int offset, int length); static void skipFully(DataInput in, int len); static int parseInt(byte[] bytes, int start, int length); static int parseInt(byte[] bytes, int start, int length, int radix); static double parseDouble(byte[] bytes, int start, int length); static final int SIZEOF_BOOLEAN; static final int SIZEOF_BYTE; static final int SIZEOF_CHAR; static final int SIZEOF_DOUBLE; static final int SIZEOF_FLOAT; static final int SIZEOF_INT; static final int SIZEOF_LONG; static final int SIZEOF_SHORT; static final int ESTIMATED_HEAP_TAX; static Comparator<byte []> BYTES_COMPARATOR; static RawComparator<byte []> BYTES_RAWCOMPARATOR; static final int LONG_BYTES; static final double powersOf10; }