static public short unpackShort(final DataInput is) throws IOException {
  short b=(short)is.readByte();
  short v;
  if ((b & 0x80) != 0) {
    v=(short)((b & 0x7f) << 8);
    b=is.readByte();
    v|=(b & 0xff);
  }
 else {
    v=b;
  }
  return (short)v;
}

static public short unpackShort ( final DataInput is ) throws IOException { short b = ( short ) is . readByte ( ) ; short v ; if ( ( b & 0x80 ) != 0 ) { v = ( short ) ( ( b & 0x7f ) << 8 ) ; b = is . readByte ( ) ; v |= ( b & 0xff ) ; } else { v = b ; } return ( short ) v ; }
unpack a non - negative short value from the input stream .
