: new XMPTree(xmp);
//System.out.println(new String(xmpEditor.toUTF8Bytes(null)));
xmpEditor.setXMPProperties(XMPTree.NS_EXIF, asXMPExifProperties(wpt));
tmpFile = xmpjpg.setXMP(ByteBuffer.wrap(xmpEditor.toXPacket(previousSize)));
} finally {
lock.release();
input.close();
}
result = (tmpFile == null) || (jpeg.delete() && tmpFile.renameTo(jpeg));
if(!result){
throw new IOException("Cannot overwrite " + jpeg + " with temporary file " + tmpFile);