/** * Create an ENML <en-media> tag for the specified Resource object. */ public static String createEnMediaTag(Resource resource) { return "<en-media hash=\"" + bytesToHex(resource.getData().getBodyHash()) + "\" type=\"" + resource.getMime() + "\"/>"; }
String hexHash = EvernoteUtil.bytesToHex(r.getData().getBodyHash()); noteContent.append("<en-media type=" + '"').append(r.getMime()); noteContent.append('"');
resource.setData(data); resource.setMime(mime); hexHash = EvernoteUtil.bytesToHex(data.getBodyHash()); note.addToResources(resource); noteContent += "<en-media type=" + '"' + resource.getMime() + '"' + " hash=" + '"' + hexHash + '"' + "/>";