code: private final static int ensureSchemasAvailable(byte[] buffer, int offset, Object store) throws MessageRestoreFailedException {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "ensureSchemasAvailable", new Object[] {offset, store});
  
      // If we have a message store we need to ensure all the schemas we'll
      // need to decode the message are restored from the store.
      int temp = ArrayUtil.readInt(buffer, offset);               // the number of encoding Ids
      offset += ArrayUtil.INT_SIZE;
      long[] decodeIds = new long[temp];
      for (int i = 0; i < temp; i++) {
        decodeIds[i] = ArrayUtil.readLong(buffer, offset);    // each encoding schema id
        offset += ArrayUtil.LONG_SIZE;
      }
      if (store != null && decodeIds.length > 0) {
        if (!(store instanceof MessageStore)) throw new IllegalArgumentException("store is not a MessageStore instance");
        SchemaStore.loadSchemas((MessageStore)store, decodeIds);
      }
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "ensureSchemasAvailable", offset);
      return offset;
    }
docs: Utility method to extract the schema ids from a message buffer and, if a
  message store is supplied, check that all the necessary schemas are available.
  
  @param buffer  The buffer containing the schema ids
  @param offset  The offset into the buffer where the schema ids start
  @param store   The MesasgeStore from which the message is being recovered, may be null.
  
  @return int The offset in the buffer of the first byte after the schema ids
  
  @exception MessageRestoreFailedException is thrown if the necessary schemas are not available.