Class PersistableTransfer
- java.lang.Object
-
- com.amazonaws.services.s3.transfer.PersistableTransfer
-
- Direct Known Subclasses:
PersistableDownload
,PersistableUpload
public abstract class PersistableTransfer extends 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
Constructors Constructor Description PersistableTransfer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends PersistableTransfer>
TdeserializeFrom(InputStream in)
Returns the deserialized transfer state of the given serialized representation.static <T extends PersistableTransfer>
TdeserializeFrom(String serialized)
Returns the deserialized transfer state of the given serialized representation.String
serialize()
Returns the serialized representation of the paused transfer state.void
serialize(OutputStream out)
Writes the serialized representation of the paused transfer state to the givenOutputStream
.
-
-
-
Method Detail
-
serialize
public final String serialize()
Returns the serialized representation of the paused transfer state.
-
serialize
public final void serialize(OutputStream out) throws IOException
Writes the serialized representation of the paused transfer state to the givenOutputStream
. Caller of this method should explicitly close theOutputStream
.- Throws:
IOException
-
deserializeFrom
public static <T extends PersistableTransfer> T deserializeFrom(InputStream in)
Returns the deserialized transfer state of the given serialized representation. Caller of this method should explicitly close theInputStream
.- Throws:
UnsupportedOperationException
- if the paused transfer type extracted from the serialized representation is not supported.
-
deserializeFrom
public static <T extends PersistableTransfer> T deserializeFrom(String serialized)
Returns the deserialized transfer state of the given serialized representation.- Throws:
UnsupportedOperationException
- if the paused transfer type extracted from the serialized representation is not supported.
-
-