Class ChunkOperations
java.lang.Object
com.mulesoftforge.mule.extension.chunking.internal.operation.ChunkOperations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.mule.runtime.extension.api.runtime.streaming.PagingProvider<ChunkingConnection, Chunk> readChunked(org.mule.runtime.api.metadata.TypedValue<InputStream> content, Integer chunkSize) Reads binary content and returns a PagingProvider of chunks.
-
Constructor Details
-
ChunkOperations
public ChunkOperations()
-
-
Method Details
-
readChunked
@DisplayName("Read Chunked") @Alias("read-chunked") @Throws(ChunkingErrorTypeProvider.class) public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<ChunkingConnection, Chunk> readChunked(@Content org.mule.runtime.api.metadata.TypedValue<InputStream> content, @Optional(defaultValue="65536") @DisplayName("Chunk Size") @Summary("Chunk size in bytes (default: 65536 = 64KB).") Integer chunkSize) Reads binary content and returns a PagingProvider of chunks. Use withto process chunks one at a time with constant memory. Memory usage is O(chunkSize), not O(fileSize). Example: <binary-streaming:read-chunked chunkSize="5242880"/> <foreach> <logger message="Chunk #[payload.index]: #[payload.length] bytes"/> <s3:upload-part partNumber="#[payload.index + 1]" content="#[payload.data]"/> </foreach>
-