static public long unpackLong(final DataInput is) throws IOException {
  int b=is.readByte();
  int nbytes;
  long l;
  if ((b & 0x80) != 0) {
    nbytes=8;
    l=b & 0x7f;
  }
 else {
    nbytes=b >> 4;
    l=b & 0x0f;
  }
  for (int i=1; i < nbytes; i++) {
    b=is.readByte();
    l=(l << 8) + (0xff & b);
  }
  return l;
}

static public long unpackLong ( final DataInput is ) throws IOException { int b = is . readByte ( ) ; int nbytes ; long l ; if ( ( b & 0x80 ) != 0 ) { nbytes = 8 ; l = b & 0x7f ; } else { nbytes = b > > 4 ; l = b & 0x0f ; } for ( int i = 1 ; i < nbytes ; i ++ ) { b = is . readByte ( ) ; l = ( l << 8 ) + ( 0xff & b ) ; } return l ; }
unpack a long value from the input stream .
