Skip to main content

Developing with XCC

OutputStreamInserter

This program demonstrates inserting dynamic content by spawning a new thread to write data to the receiving end of an input stream. For an alternative method of inserting dynamically generated streamed content, see the example DynamicContentStream.

The following is a sample command to run the OutputStreamInserter program:

java -classpath "XCC_HOME/lib/xcc.jar:XCC_HOME/lib/xccexamples.jar"
     com.marklogic.xcc.examples.OutputStreamInserter 
     xcc://username:password@localhost:8021
     /any/valid/docURI

This inserts a new document at /any/valid/docURI in the contentbase described by the XDBC App Server URI, xcc://username:password@localhost:8021. For demonstration purposes, the document contents are generated dynamically by the sample application.