Package org.jclouds.http.internal
Class PayloadEnclosingImpl
- java.lang.Object
-
- org.jclouds.http.internal.PayloadEnclosingImpl
-
- All Implemented Interfaces:
PayloadEnclosing
- Direct Known Subclasses:
AtmosObjectImpl
,AzureBlobImpl
,BlobImpl
,HttpMessage
,S3ObjectImpl
public class PayloadEnclosingImpl extends Object implements PayloadEnclosing
-
-
Constructor Summary
Constructors Constructor Description PayloadEnclosingImpl()
PayloadEnclosingImpl(Payload payload)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Payload
getPayload()
int
hashCode()
void
resetPayload(boolean release)
void
setPayload(byte[] data)
void
setPayload(com.google.common.io.ByteSource data)
void
setPayload(File data)
void
setPayload(InputStream data)
void
setPayload(String data)
void
setPayload(Payload data)
Sets payload for the request or the content from the response.
-
-
-
Field Detail
-
payload
protected Payload payload
-
-
Method Detail
-
getPayload
public Payload getPayload()
- Specified by:
getPayload
in interfacePayloadEnclosing
-
setPayload
public void setPayload(Payload data)
Sets payload for the request or the content from the response. If size isn't set, this will attempt to discover it.- Specified by:
setPayload
in interfacePayloadEnclosing
- Parameters:
data
- typically InputStream for downloads, or File, byte[], String, InputStream, of ByteSource for uploads.
-
setPayload
public void setPayload(InputStream data)
- Specified by:
setPayload
in interfacePayloadEnclosing
-
setPayload
public void setPayload(byte[] data)
- Specified by:
setPayload
in interfacePayloadEnclosing
-
setPayload
public void setPayload(String data)
- Specified by:
setPayload
in interfacePayloadEnclosing
-
setPayload
public void setPayload(File data)
- Specified by:
setPayload
in interfacePayloadEnclosing
-
setPayload
public void setPayload(com.google.common.io.ByteSource data)
- Specified by:
setPayload
in interfacePayloadEnclosing
-
resetPayload
public void resetPayload(boolean release)
- Specified by:
resetPayload
in interfacePayloadEnclosing
-
-