return h.getValue() ;
}
private Graph exec(String targetStr, Graph graphToSend, HttpUriRequest httpRequest, boolean processBody)
{
HttpClient httpclient = new SystemDefaultHttpClient(httpParams) ;
if ( graphToSend != null )
{
// ??? httpRequest isa Post
// Impedence mismatch - is there a better way?
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
try {
HttpResponse response = httpclient.execute(httpRequest) ;
int responseCode = response.getStatusLine().getStatusCode() ;
String responseMessage = response.getStatusLine().getReasonPhrase() ;
if ( HttpSC.isRedirection(responseCode) )