try {
Writer w = new OutputStreamWriter(out, Charsets.UTF_8);
w.write(content);
w.flush();
} catch (UnsupportedEncodingException ex) {
throw new SomethingWidgyHappenedError(ex);
} catch (IOException ex) {
throw new SomethingWidgyHappenedError(ex);
}
registerUri(uri, out.toByteArray(), contentType, "UTF-8");
}