com.amazonaws.services.s3.transfer
Class PersistableTransfer

java.lang.Object
  extended by com.amazonaws.services.s3.transfer.PersistableTransfer
Direct Known Subclasses:
PersistableDownload, PersistableUpload

public abstract class PersistableTransfer
extends java.lang.Object

Abstract base class for the information of a pausible upload or download; such information can be used to resume the upload or download later on, and can be serialized/deserialized for persistence purposes.


Constructor Summary
PersistableTransfer()
           
 
Method Summary
static
<T extends PersistableTransfer>
T
deserializeFrom(java.io.InputStream in)
          Returns the deserialized transfer state of the given serialized representation.
static
<T extends PersistableTransfer>
T
deserializeFrom(java.lang.String serialized)
          Returns the deserialized transfer state of the given serialized representation.
 java.lang.String serialize()
          Returns the serialized representation of the paused transfer state.
 void serialize(java.io.OutputStream out)
          Writes the serialized representation of the paused transfer state to the given OutputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistableTransfer

public PersistableTransfer()
Method Detail

serialize

public final java.lang.String serialize()
Returns the serialized representation of the paused transfer state.


serialize

public final void serialize(java.io.OutputStream out)
                     throws java.io.IOException
Writes the serialized representation of the paused transfer state to the given OutputStream. Caller of this method should explicitly close the OutputStream.

Throws:
java.io.IOException

deserializeFrom

public static <T extends PersistableTransfer> T deserializeFrom(java.io.InputStream in)
Returns the deserialized transfer state of the given serialized representation. Caller of this method should explicitly close the InputStream.

Throws:
java.lang.UnsupportedOperationException - if the paused transfer type extracted from the serialized representation is not supported.

deserializeFrom

public static <T extends PersistableTransfer> T deserializeFrom(java.lang.String serialized)
Returns the deserialized transfer state of the given serialized representation.

Throws:
java.lang.UnsupportedOperationException - if the paused transfer type extracted from the serialized representation is not supported.


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.