docs: public long[] checkSchemata(byte[] contents, int offset)
        throws JMFMessageCorruptionException {
      int numUnknown = 0;
      long[] unknownSchemata = null;
      try {
        //find out how many schemata there are
        int nSchemata = ArrayUtil.readShort(contents, offset);
        // Make sure the size looks valid before we allocate space and start reading
        if (nSchemata < 0 || offset+2 + nSchemata*8 > contents.length) {
          JMFMessageCorruptionException jmce =  new JMFMessageCorruptionException(
              "Bad schemata length: " + nSchemata + " at offset " + offset);
          FFDCFilter.processException(jmce, "com.ibm.ws.sib.mfp.jmf.impl.JSchemaInterpreterImpl.checkSchemata", "98", this,
              new Object[] { MfpConstants.DM_BUFFER, contents, Integer.valueOf(0), Integer.valueOf(contents.length) });
          throw jmce;
        }
        offset += 2;
        unknownSchemata = new long[nSchemata];
        for (int i = 0; i < nSchemata; i++) {
          //read the schema id
          long schemaId = ArrayUtil.readLong(contents, offset);
          offset += 8;
          //try to look up the schema
          JMFSchema schema = JMFRegistry.instance.retrieve(schemaId);
          //if we don't find the schema, record the id in the array to be
          //returned
          if(schema == null){
            unknownSchemata[numUnknown] = schemaId;
            numUnknown++;
          }
        }
      } catch (ArrayIndexOutOfBoundsException e) {
        FFDCFilter.processException(e, "com.ibm.ws.sib.mfp.jmf.impl.JSchemaInterpreterImpl.checkSchemata", "101", this,
            new Object[] { MfpConstants.DM_BUFFER, contents, Integer.valueOf(0), Integer.valueOf(contents.length) });
        // If we get an ArrayIndexOutOfBounds error we have tried to read beyond the end
        // of the supplied contents buffer.  This means the data provided must be invalid.
        throw new JMFMessageCorruptionException("Attempt to read beyond end of data buffer", e);
      }
      //copy the unknown ids in to an array of the right size
      if(numUnknown > 0){
        long[] result = new long[numUnknown];
        System.arraycopy(unknownSchemata, 0, result, 0, numUnknown);
        return result;
      }
      else
      {
        return new long[0];
      }
    }