public final long readLong() throws java.io.IOException {
  readFully(scratch,0,8);
  int h=((scratch[0] & 0xff) << 24) | ((scratch[1] & 0xff) << 16) | ((scratch[2] & 0xff) << 8)| ((scratch[3] & 0xff) << 0);
  int l=((scratch[4] & 0xff) << 24) | ((scratch[5] & 0xff) << 16) | ((scratch[6] & 0xff) << 8)| ((scratch[7] & 0xff) << 0);
  return (((long)h) << 32L) | ((long)l) & 0xffffffffL;
}

public final long readLong ( ) throws java . io . IOException { readFully ( scratch , 0 , 8 ) ; int h = ( ( scratch [ 0 ] & 0xff ) << 24 ) | ( ( scratch [ 1 ] & 0xff ) << 16 ) | ( ( scratch [ 2 ] & 0xff ) << 8 ) | ( ( scratch [ 3 ] & 0xff ) << 0 ) ; int l = ( ( scratch [ 4 ] & 0xff ) << 24 ) | ( ( scratch [ 5 ] & 0xff ) << 16 ) | ( ( scratch [ 6 ] & 0xff ) << 8 ) | ( ( scratch [ 7 ] & 0xff ) << 0 ) ; return ( ( ( long ) h ) << 32L ) | ( ( long ) l ) & 0xffffffffL ; }
see the general contract of the readlong method of datainput . bytes for this operation are read from the contained input stream .
