Class PersistableTransfer
java.lang.Object
com.amazonaws.services.s3.transfer.PersistableTransfer
- Direct Known Subclasses:
PersistableDownload
,PersistableUpload
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends PersistableTransfer>
TReturns 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.final String
Returns the serialized representation of the paused transfer state.final void
serialize
(OutputStream out) Writes the serialized representation of the paused transfer state to the givenOutputStream
.
-
Constructor Details
-
PersistableTransfer
public PersistableTransfer()
-
-
Method Details
-
serialize
Returns the serialized representation of the paused transfer state. -
serialize
Writes the serialized representation of the paused transfer state to the givenOutputStream
. Caller of this method should explicitly close theOutputStream
.- Throws:
IOException
-
deserializeFrom
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
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.
-