}
private static void incomingData(HttpAction action, StreamRDF dest) {
String base = wholeRequestURL(action.request) ;
ContentType ct = FusekiLib.getContentType(action) ;
Lang lang = RDFLanguages.contentTypeToLang(ct.getContentType()) ;
if ( lang == null ) {
errorBadRequest("Unknown content type for triples: " + ct) ;
return ;
}
InputStream input = null ;
try { input = action.request.getInputStream() ; }
catch (IOException ex) { IO.exception(ex) ; }
int len = action.request.getContentLength() ;
if ( action.verbose ) {
if ( len >= 0 )
log.info(format("[%d] Body: Content-Length=%d, Content-Type=%s, Charset=%s => %s", action.id, len,
ct.getContentType(), ct.getCharset(), lang.getName())) ;
else
log.info(format("[%d] Body: Content-Type=%s, Charset=%s => %s", action.id, ct.getContentType(),
ct.getCharset(), lang.getName())) ;
}
parse(action, dest, input, lang, base) ;
}