Resource... contexts)
throws IOException, RDFParseException, RepositoryException
{
if (isAutoCommit()) {
// Send bytes directly to the server
HTTPClient httpClient = getRepository().getHTTPClient();
if (inputStreamOrReader instanceof InputStream) {
httpClient.upload(((InputStream)inputStreamOrReader), baseURI, dataFormat, false, contexts);
}
else if (inputStreamOrReader instanceof Reader) {
httpClient.upload(((Reader)inputStreamOrReader), baseURI, dataFormat, false, contexts);
}
else {
throw new IllegalArgumentException(
"inputStreamOrReader must be an InputStream or a Reader, is a: "
+ inputStreamOrReader.getClass());