Package org.openstack4j.model.common
Interface Payload<T>
-
- Type Parameters:
T- the type of payload object
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
FilePayload,InputStreamPayload,URLPayload
public interface Payload<T> extends Closeable
Payload holds a reference to a Payload Object whether it be a file, inputstream or other and provides an input stream when uploading data to OpenStack.- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcloseQuietly()Closes the stream and releases state.TgetRaw()Gets the raw underlying object for the Payload.InputStreamopen()Opens and returns the input stream.
-
-
-
Method Detail
-
open
InputStream open()
Opens and returns the input stream.- Returns:
- the input stream
-
closeQuietly
void closeQuietly()
Closes the stream and releases state.
-
getRaw
T getRaw()
Gets the raw underlying object for the Payload.- Returns:
- the raw object
-
-