ByteArrayOutputStream out = new ByteArrayOutputStream() ;
Model model = ModelFactory.createModelForGraph(graphToSend) ;
model.write(out, "RDF/XML") ;
byte[] bytes = out.toByteArray() ;
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()) ;
InputStreamEntity reqEntity = new InputStreamEntity(in, bytes.length) ;
reqEntity.setContentType(WebContent.contentTypeRDFXML) ;
reqEntity.setContentEncoding(WebContent.charsetUTF8) ;
HttpEntity entity = reqEntity ;
((HttpEntityEnclosingRequestBase)httpRequest).setEntity(entity) ;
}
TypedInputStream ts = null ;
// httpclient.getParams().setXXX