public static class OutputStreamInserter.DocBuilder extends Object implements Runnable
OutputStream. This is a
brain-dead example that simply generates dummy content. A real implementation might be
fetching rows from an SQL database or some other transient source. You should only use this
approach if you don't have a better option. If the data can be written to a temp file or
provided as a standard InputStream then one of the provided implementations
in ContentFactory should be used. Note also that inserting content
this way is not eligible for automatic error recovery and you can get in trouble if you don't
manage threads properly.| Constructor and Description |
|---|
OutputStreamInserter.DocBuilder(OutputStream out,
int lines)
Initialize this instance.
|
public OutputStreamInserter.DocBuilder(OutputStream out, int lines)
out - An OutputStream to which content should be written.lines - How many lines to generate.public void run()
Thread starts. This is where your real business logic
would go, ulitmately writing data to the OutputStream.Copyright © 2016 MarkLogic Corporation. All Rights Reserved.
Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com