code: private static ITag injectMetaData(IMetaData<?, ?> meta, ITag tag) {
          IoBuffer bb = IoBuffer.allocate(1000);
          bb.setAutoExpand(true);
          Output out = new Output(bb);
          Serializer.serialize(out, "onMetaData");
          Serializer.serialize(out, meta);
          IoBuffer tmpBody = out.buf().flip();
          int tmpBodySize = out.buf().limit();
          int tmpPreviousTagSize = tag.getPreviousTagSize();
          return new Tag(IoConstants.TYPE_METADATA, 0, tmpBodySize, tmpBody, tmpPreviousTagSize);
      }
docs: Injects metadata (other than Cue points) into a tag
  
  @param meta
  Metadata
  @param tag
  Tag
  @return New tag with injected metadata