this.contentEncoding = contentEncoding;
this.contentLoggingLimit = contentLoggingLimit;
}
public void writeTo(OutputStream out) throws IOException {
LoggingOutputStream loggableOutputStream =
new LoggingOutputStream(out, HttpTransport.LOGGER, Level.CONFIG, contentLoggingLimit);
try {
httpContent.writeTo(loggableOutputStream);
} finally {
// force the log stream to close
loggableOutputStream.getLogStream().close();
}
out.flush();
}