summaryrefslogtreecommitdiffstats
path: root/src/RDFWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/RDFWriter.cpp')
-rw-r--r--src/RDFWriter.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/RDFWriter.cpp b/src/RDFWriter.cpp
index f2d5626..6a69765 100644
--- a/src/RDFWriter.cpp
+++ b/src/RDFWriter.cpp
@@ -84,6 +84,23 @@ RDFWriter::blank_id()
}
+/** Begin a serialization to a C file handle.
+ *
+ * This must be called before any write methods.
+ */
+void
+RDFWriter::start_to_file_handle(FILE* fd) throw (std::logic_error)
+{
+ if (_serializer)
+ throw std::logic_error("start_to_string called with serialization in progress");
+
+ raptor_init();
+ _serializer = raptor_new_serializer(RDF_LANG);
+ raptor_serialize_start_to_file_handle(_serializer, NULL, fd);
+ setup_prefixes();
+}
+
+
/** Begin a serialization to a file.
*
* This must be called before any write methods.