{
// Not as good as from an InputStream - RDF/XML not supported
ContentType ct = determineCT(base, null, lang) ;
if ( ct == null )
throw new RiotException("Failed to determine the triples content type: (URI="+base+" : hint="+lang+")") ;
LangRIOT parser ;
if ( lang == null )
throw new RiotException("No language specificied") ;
if ( RDFLanguages.sameLang(RDFLanguages.RDFXML, lang) )
parser = LangRDFXML.create(in, base, base, ErrorHandlerFactory.errorHandlerStd, output) ;
else
{
Tokenizer tokenizer =
RDFLanguages.RDFJSON.equals(lang)?
new TokenizerJSON(PeekReader.make(in)) :
TokenizerFactory.makeTokenizer(in) ;
parser = RiotReader.createParser(tokenizer, lang, base, output) ;
}
parser.parse() ;
}