org.jclouds.io
Interface PayloadSlicer

All Known Implementing Classes:
BasePayloadSlicer

public interface PayloadSlicer


Method Summary
 Iterable<Payload> slice(Payload input, long size)
          Returns an Iterable of Payload instances that are no larger than size bytes in length.
 Payload slice(Payload input, long offset, long length)
          Returns a Payload that 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.
 

Method Detail

slice

Payload slice(Payload input,
              long offset,
              long length)
Returns a Payload that 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.

Parameters:
input - the payload from which to get the raw streams
offset - the offset in bytes into the underlying stream where the returned streams will start
length - the maximum length of the returned streams
Throws:
IllegalArgumentException - if offset or length are negative

slice

Iterable<Payload> slice(Payload input,
                        long size)
Returns an Iterable of Payload instances that are no larger than size bytes in length.

Parameters:
input - the Payload to be sliced
size - the maximum size of each slice
Returns:
an Iterable of Payload instances


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.