code: public static String createEnMediaTag(Resource resource) {
          return "<en-media hash=\"" + bytesToHex(resource.getData().getBodyHash()) + "\" type=\"" + resource.getMime() + "\"/>";
      }
docs: Create an ENML &lt;en-media&gt; tag for the specified Resource object.