code: public static short[] decodeOctetString(ByteBuffer buf) {
          DerId id = DerId.decode(buf);
          if (!id.matches(DerId.TagClass.UNIVERSAL, ASN1_OCTET_STRING_TAG_NUM)) {
              throw new IllegalArgumentException("Expected OCTET STRING identifier, received " + id);
          }
          int len = DerUtils.decodeLength(buf);
          if (buf.remaining() < len) {
              throw new IllegalArgumentException("Insufficient content for OCTET STRING");
          }
          short[] dst = new short[len];
          for (int i = 0; i < len; i++) {
              dst[i] = (short) (0xff & buf.get());
          }
          return dst;
      }
docs: Decode an ASN.1 OCTET STRING.
  
  @param buf
  the DER-encoded OCTET STRING
  @return the octets