org.jclouds.http.internal
Class PayloadEnclosingImpl

java.lang.Object
  extended by org.jclouds.http.internal.PayloadEnclosingImpl
All Implemented Interfaces:
PayloadEnclosing
Direct Known Subclasses:
AtmosObjectImpl, AzureBlobImpl, BlobImpl, HttpMessage, S3ObjectImpl, SwiftObjectImpl

public class PayloadEnclosingImpl
extends Object
implements PayloadEnclosing

Author:
Adrian Cole

Field Summary
protected  Payload payload
           
 
Constructor Summary
PayloadEnclosingImpl()
           
PayloadEnclosingImpl(Payload payload)
           
 
Method Summary
 boolean equals(Object obj)
           
 Payload getPayload()
          
 int hashCode()
           
 void setPayload(byte[] data)
          
 void setPayload(File data)
          
 void setPayload(InputStream data)
          
 void setPayload(Payload data)
          Sets payload for the request or the content from the response.
 void setPayload(String data)
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

payload

protected Payload payload
Constructor Detail

PayloadEnclosingImpl

public PayloadEnclosingImpl()

PayloadEnclosingImpl

public PayloadEnclosingImpl(@Nullable
                            Payload payload)
Method Detail

getPayload

public Payload getPayload()

Specified by:
getPayload in interface PayloadEnclosing

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 interface PayloadEnclosing
Parameters:
data - typically InputStream for downloads, or File, byte [], String, or InputStream for uploads.

setPayload

public void setPayload(InputStream data)

Specified by:
setPayload in interface PayloadEnclosing

setPayload

public void setPayload(byte[] data)

Specified by:
setPayload in interface PayloadEnclosing

setPayload

public void setPayload(String data)

Specified by:
setPayload in interface PayloadEnclosing

setPayload

public void setPayload(File data)

Specified by:
setPayload in interface PayloadEnclosing

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2009-2011 jclouds. All Rights Reserved.