@Override
public void writeTo(Reader reader, Class<?> type, Type genericType,
Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, Object> httpHeaders,
OutputStream entityStream) throws IOException {
CharacterSet cs = Response.getCurrent().getEntity().getCharacterSet();
BioUtils.copy(reader, BioUtils.getWriter(entityStream, cs));
}