code: static public long unpackLong(DataInput in) throws IOException {
          long ret = 0;
          byte v;
          do{
              v = in.readByte();
              ret = (ret<<7 ) | (v & 0x7F);
          }while((v&0x80)==0);
  
          return ret;
      }
docs: Unpack long value from the input stream.
  
  @param in The input stream.
  @return The long value.
  
  @throws java.io.IOException in case of IO error