code: public static short decodeShort(byte[] src, int srcOffset)
          throws CorruptEncodingException
      {
          try {
              return (short)(((src[srcOffset] << 8) | (src[srcOffset + 1] & 0xff)) ^ 0x8000);
          } catch (IndexOutOfBoundsException e) {
              throw new CorruptEncodingException(null, e);
          }
      }
docs: Decodes a signed short from exactly 2 bytes.
  
  @param src source of encoded bytes
  @param srcOffset offset into source array
  @return signed short value