public class OutputStreamHandle extends BaseHandle<OperationNotSupported,OutputStreamSender> implements BinaryWriteHandle, GenericWriteHandle, JSONWriteHandle, TextWriteHandle, XMLWriteHandle, StructureWriteHandle, CtsQueryWriteHandle, TriplesWriteHandle
UNKNOWN_LENGTH
Constructor and Description |
---|
OutputStreamHandle()
Zero-argument constructor.
|
OutputStreamHandle(OutputStreamSender sender)
Initializes the handle with an outputstream sender providing
the callback that writes content to the database via an output stream.
|
Modifier and Type | Method and Description |
---|---|
OutputStreamSender |
get()
Returns the output stream sender that writes the content.
|
boolean |
isResendable()
Returns whether the content can be resent to the output stream
if the request must be retried.
|
protected OutputStreamSender |
sendContent() |
void |
set(OutputStreamSender sender)
Assigns an output stream sender providing the callback that writes
content to the database via an output stream.
|
void |
setResendable(boolean resendable)
Specifies whether the content can be resent to the output stream
if the request must be retried.
|
OutputStreamHandle |
with(OutputStreamSender sender)
Assigns an output stream sender providing the callback that writes
content to the database and returns the handle as a fluent convenience.
|
OutputStreamHandle |
withFormat(Format format)
Specifies the format of the content and returns the handle
as a fluent convenience.
|
OutputStreamHandle |
withMimetype(java.lang.String mimetype)
Specifies the mime type of the content and returns the handle
as a fluent convenience.
|
OutputStreamHandle |
withResendable(boolean resendable)
Specifies whether the content can be resent to the output stream and
returns the handle as a fluent convenience.
|
getByteLength, getFormat, getMimetype, getServerTimestamp, setByteLength, setFormat, setMimetype, setServerTimestamp
public OutputStreamHandle()
public OutputStreamHandle(OutputStreamSender sender)
sender
- the processor that sends content to the databasepublic OutputStreamHandle withFormat(Format format)
format
- the format of the contentpublic OutputStreamHandle withMimetype(java.lang.String mimetype)
mimetype
- the mime type of the contentpublic boolean isResendable()
isResendable
in class com.marklogic.client.impl.HandleImplementation<OperationNotSupported,OutputStreamSender>
public void setResendable(boolean resendable)
setResendable
in class com.marklogic.client.impl.HandleImplementation<OperationNotSupported,OutputStreamSender>
public OutputStreamHandle withResendable(boolean resendable)
resendable
- true if the content can be sent againpublic OutputStreamSender get()
public void set(OutputStreamSender sender)
sender
- the output stream senderpublic OutputStreamHandle with(OutputStreamSender sender)
sender
- the output stream senderprotected OutputStreamSender sendContent()
sendContent
in class com.marklogic.client.impl.HandleImplementation<OperationNotSupported,OutputStreamSender>
Copyright © 2013-2018 MarkLogic Corporation.