|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.marklogic.xdmp.XDMPDocInsertStream
Use XDMPDocInsertStream to insert a document into a Mark Logic Content Interaction Server database.
When using XDMPDocInsertStream, it is good coding practice to catch XQuery exceptions and retry them if the exceptions are retryable (using the XDBCXQueryException.getRetryable() method).
XDMPConnection.openDocInsertStream(java.lang.String),
XDMPConnection.openDocInsertStream(java.lang.String, java.util.Locale),
XDMPConnection.openDocInsertStream(java.lang.String, java.util.Locale, boolean, com.marklogic.xdmp.XDMPPermission[]),
XDMPConnection.openDocInsertStream(java.lang.String, java.util.Locale, boolean, java.lang.String[]),
XDMPConnection.openDocInsertStream(java.lang.String, java.util.Locale, boolean, com.marklogic.xdmp.XDMPPermission[], java.lang.String[]),
XDBCXQueryException.getRetryable()| Field Summary | |
static int |
XDMP_DOC_FORMAT_BINARY
|
static int |
XDMP_DOC_FORMAT_NONE
Document insert format. |
static int |
XDMP_DOC_FORMAT_TEXT
|
static int |
XDMP_DOC_FORMAT_XML
|
static int |
XDMP_ERROR_CORRECTION_FULL
Document insert error correction level: indicates that the MarkCIS server attempts to insert missing tags and ignore extraneous tags if necessary to make the loaded document be well-formed. |
static int |
XDMP_ERROR_CORRECTION_NONE
Document insert error correction level: indicates that an error is signaled by the MarkCIS server if a non- well-formed document is loaded. |
| Method Summary | |
void |
abort()
Aborts the document insert. |
void |
close()
Closes this output stream and releases any system resources associated with it. |
void |
commit()
Commits the document insert to the database. |
protected void |
finalize()
|
void |
flush()
Flushes this output stream and forces any buffered output bytes to be written out. |
void |
newDocument(String uri,
XDMPDocOptions docOpts)
Starts a new document on this document insert stream. |
String |
toString()
Returns a string representation of this XDMPDocInsertStream object. |
void |
write(byte[] b)
Writes b.length bytes from the specified byte array to this output stream. |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this output stream. |
void |
write(int b)
Writes the specified byte to this output stream. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int XDMP_ERROR_CORRECTION_NONE
public static final int XDMP_ERROR_CORRECTION_FULL
public static final int XDMP_DOC_FORMAT_NONE
public static final int XDMP_DOC_FORMAT_BINARY
public static final int XDMP_DOC_FORMAT_TEXT
public static final int XDMP_DOC_FORMAT_XML
| Method Detail |
protected void finalize()
throws Throwable
Throwable
public void newDocument(String uri,
XDMPDocOptions docOpts)
throws XDBCException
uri - A URI by which the new document will be known to
the database after it is inserted.docOpts - An XDMPDocOptions object used to specify the
options for the document when it is loaded.
XDBCException - If a database error occurs.XDMPDocOptions
public void commit()
throws XDBCException
XDBCException - if a database error occurs.
public void abort()
throws XDBCException
XDBCException - if a database error occurs.
public void close()
throws IOException
IOException - if an IO exception occurs on the stream.
public void flush()
throws IOException
IOException - if an IO exception occurs on the stream.
public void write(byte[] b)
throws IOException
b - a byte array to be written.
IOException - if an IO exception occurs on the stream.
public void write(byte[] b,
int off,
int len)
throws IOException
b - a byte array to be written.off - the integer offset into the array at which writing
beginslen - the integer length of bytes to write to the array.
IOException - if an IO exception occurs on the stream.
public void write(int b)
throws IOException
b - a single byte to be written to the stream.
IOException - if an IO exception occurs on the stream.public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||