|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jclouds.io.Payloads
public class Payloads
Method Summary | ||
---|---|---|
static Payload |
calculateMD5(Payload payload)
Uses default md5 generator. |
|
static Payload |
calculateMD5(Payload payload,
MessageDigest md5)
Calculates and sets Payload#setContentMD5 on the payload. |
|
static
|
calculateMD5(T payloadEnclosing)
Calculates the md5 on a payload, replacing as necessary. |
|
static
|
calculateMD5(T payloadEnclosing,
MessageDigest md5)
Calculates the md5 on a payload, replacing as necessary. |
|
static ByteArrayPayload |
newByteArrayPayload(byte[] data)
|
|
static FilePayload |
newFilePayload(File data)
|
|
static InputStreamPayload |
newInputStreamPayload(InputStream data)
|
|
static Payload |
newPayload(Object data)
|
|
static StringPayload |
newStringPayload(String data)
|
|
static UrlEncodedFormPayload |
newUrlEncodedFormPayload(com.google.common.collect.Multimap<String,String> formParams,
char... skips)
|
|
static UrlEncodedFormPayload |
newUrlEncodedFormPayload(com.google.common.collect.Multimap<String,String> formParams,
Comparator<Map.Entry<String,String>> sorter,
char... skips)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Payload newPayload(Object data)
public static InputStreamPayload newInputStreamPayload(InputStream data)
public static ByteArrayPayload newByteArrayPayload(byte[] data)
public static StringPayload newStringPayload(String data)
public static FilePayload newFilePayload(File data)
public static UrlEncodedFormPayload newUrlEncodedFormPayload(com.google.common.collect.Multimap<String,String> formParams, char... skips)
public static UrlEncodedFormPayload newUrlEncodedFormPayload(com.google.common.collect.Multimap<String,String> formParams, @Nullable Comparator<Map.Entry<String,String>> sorter, char... skips)
public static Payload calculateMD5(Payload payload, MessageDigest md5) throws IOException
Payload#setContentMD5
on the payload.
note that this will rebuffer in memory if the payload is not repeatable.
payload
- payload to calculatemd5
- digester to calculate payloads with.
IOException
public static Payload calculateMD5(Payload payload) throws IOException
IOException
calculateMD5(Payload, MessageDigest)
public static <T extends PayloadEnclosing> T calculateMD5(T payloadEnclosing, MessageDigest md5) throws IOException
IOException
calculateMD5(Payload, MessageDigest)
public static <T extends PayloadEnclosing> T calculateMD5(T payloadEnclosing) throws IOException
IOException
calculateMD5(Payload, MessageDigest)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |