Here you can find the source of readLong(DataInput dataInput)
public static long readLong(DataInput dataInput) throws IOException
//package com.java2s; //License from project: Apache License import java.io.DataInput; import java.io.IOException; public class Main { public static long readLong(DataInput dataInput) throws IOException { byte[] bytes = new byte[8]; dataInput.readFully(bytes);//from w ww. ja v a 2 s . co m return (((long) bytes[7] << 56) + ((long) (bytes[6] & 255) << 48) + ((long) (bytes[5] & 255) << 40) + ((long) (bytes[4] & 255) << 32) + ((long) (bytes[3] & 255) << 24) + ((bytes[2] & 255) << 16) + ((bytes[1] & 255) << 8) + ((bytes[0] & 255) << 0)); } }