final int rllong(DataInputStream dis) throws IOException {
  int b1, b2, b3, b4;
  int i=0;
  i=dis.readInt();
  b1=(i & 0xFF) << 24;
  b2=(i & 0xFF00) << 8;
  b3=(i & 0xFF0000) >> 8;
  b4=(i & 0xFF000000) >>> 24;
  i=(b1 | b2 | b3| b4);
  return i;
}

final int rllong ( DataInputStream dis ) throws IOException { int b1 , b2 , b3 , b4 ; int i = 0 ; i = dis . readInt ( ) ; b1 = ( i & 0xFF ) << 24 ; b2 = ( i & 0xFF00 ) << 8 ; b3 = ( i & 0xFF0000 ) > > 8 ; b4 = ( i & 0xFF000000 ) > > > 24 ; i = ( b1 | b2 | b3 | b4 ) ; return i ; }
rllong protected helper method to read 64 bits and changing the order of each bytes .
