
com.marklogic.client.io.marker.StreamingContentHandle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of marklogic-client-api Show documentation
Show all versions of marklogic-client-api Show documentation
The official MarkLogic Java client API.
The newest version!
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.client.io.marker;
import com.marklogic.client.io.BaseHandle;
import com.marklogic.client.io.BytesHandle;
/**
* A Streaming Content Handle provides an adapter for a streaming content
* representation to make it possible to construct a bufferable content
* representation so the content can be read multiple times for purposes
* such as resending input when retrying after a
* failed request.
* @param the handled content representation
* @param the serialization when reading the content
*/
public interface StreamingContentHandle extends BufferableContentHandle {
@Override
default BufferableContentHandle,?> resendableHandleFor(C content) {
return new BytesHandle(contentToBytes(content))
.withFormat(((BaseHandle) this).getFormat());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy