Here you can find the source of parseLong(byte[] array, int offset, long[] result)
public static long[] parseLong(byte[] array, int offset, long[] result)
//package com.java2s; //License from project: Open Source License public class Main { public static long[] parseLong(byte[] array, int offset, long[] result) { return parseLong(array, offset, 0, result); }// ww w . j ava2 s . c o m public static long[] parseLong(byte[] array, int offset, int multiplier, long[] result) { result[0] = 0; boolean decimal = false; int i, m = multiplier; for (i = offset; i < array.length; i++) { final byte digit = array[i]; if (digit == '.') { decimal = true; } else if ((digit < '0' || digit > '9') || (decimal && m == 0)) { break; } else { result[0] *= 10; result[0] += array[i] - '0'; if (decimal) { m--; } } } for (int j = 0; j < m; j++) { result[0] *= 10; } result[1] = i; return result; } }