Here you can find the source of toLong(String s)
static long toLong(String s)
//package com.java2s; public class Main { static long toLong(String s) { byte[] bytes = s.getBytes(); long value = byteToInt(bytes, 0) & 0xFFFFFFFFL; return value; }/*from w w w .ja v a 2s .com*/ public static final int byteToInt(byte[] source, int sourceOffset) { return ((source[sourceOffset++] & 0xFF) << 24) | ((source[sourceOffset++] & 0xFF) << 16) | ((source[sourceOffset++] & 0xFF) << 8) | (source[sourceOffset++] & 0xFF); } }