use of org.apache.tika.xmp.XMPMetadata in project tika by apache.
the class XMPMessageBodyWriter method writeTo.
@Override
public void writeTo(Metadata metadata, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException {
try {
Writer writer = new OutputStreamWriter(entityStream, UTF_8);
XMPMetadata xmp = new XMPMetadata(metadata);
writer.write(xmp.toString());
writer.flush();
} catch (TikaException e) {
throw new IOException(e);
}
entityStream.flush();
}
Aggregations