Package org.jclouds.io.internal
Class BasePayloadSlicer
java.lang.Object
org.jclouds.io.internal.BasePayloadSlicer
- All Implemented Interfaces:
PayloadSlicer
- Direct Known Subclasses:
NettyPayloadSlicer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PayloadcopyMetadataAndSetLength(Payload input, Payload returnVal, long length) protected PayloaddoSlice(byte[] content, long offset, long length) doSlice(byte[] rawContent, ContentMetadata meta) protected PayloaddoSlice(com.google.common.io.ByteSource content, long offset, long length) doSlice(com.google.common.io.ByteSource rawContent, ContentMetadata meta) protected PayloaddoSlice(File rawContent, ContentMetadata meta) protected PayloaddoSlice(InputStream content, long offset, long length) doSlice(InputStream rawContent, ContentMetadata meta) protected PayloaddoSlice(String rawContent, ContentMetadata meta) protected PayloaddoSlice(Payload input, ContentMetadata meta) Returns aPayloadthat returns input streams from the an underlying payload, where each stream starts at the given offset and is limited to the specified number of bytes.
-
Constructor Details
-
BasePayloadSlicer
public BasePayloadSlicer()
-
-
Method Details
-
slice
Returns aPayloadthat returns input streams from the an underlying payload, where each stream starts at the given offset and is limited to the specified number of bytes.- Specified by:
slicein interfacePayloadSlicer- Parameters:
input- the payload from which to get the raw streamsoffset- the offset in bytes into the underlying stream where the returned streams will startlength- the maximum length of the returned streams
-
doSlice
-
doSlice
-
doSlice
-
doSlice
-
doSlice
-
doSlice
-
copyMetadataAndSetLength
-
slice
Description copied from interface:PayloadSlicer- Specified by:
slicein interfacePayloadSlicer- Parameters:
input- thePayloadto be slicedsize- the maximum size of each slice- Returns:
- an
IterableofPayloadinstances
-
doSlice
-
doSlice
-
doSlice
-
doSlice
-
doSlice
-
doSlice
protected Iterable<Payload> doSlice(com.google.common.io.ByteSource rawContent, ContentMetadata meta)
-