Package com.cumulocity.sdk.client.event
Class EventBinaryApiImpl
java.lang.Object
com.cumulocity.sdk.client.event.EventBinaryApiImpl
- All Implemented Interfaces:
EventBinaryApi
-
Constructor Summary
ConstructorsConstructorDescriptionEventBinaryApiImpl(RestConnector restConnector, EventsApiRepresentation eventsApiRepresentation) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateEventBinary(String id, byte[] bytes) Upload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.voiddeleteEventBinary(String eventId) Remove stored file from given event ID.getEventBinary(String eventId) Download a stored file from given event ID.voidupdateEventBinary(String id, byte[] bytes) Replace the attached file (binary) to given event ID.
-
Constructor Details
-
EventBinaryApiImpl
public EventBinaryApiImpl(RestConnector restConnector, EventsApiRepresentation eventsApiRepresentation)
-
-
Method Details
-
getEventBinary
Description copied from interface:EventBinaryApiDownload a stored file from given event ID.- Specified by:
getEventBinaryin interfaceEventBinaryApi- Parameters:
eventId- ID of event- Returns:
- file (binary)
- Throws:
SDKException- if download fails
-
createEventBinary
Description copied from interface:EventBinaryApiUpload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.- Specified by:
createEventBinaryin interfaceEventBinaryApi- Parameters:
id- ID of eventbytes- file (binary) to be uploaded- Throws:
SDKException- if upload fails
-
updateEventBinary
Description copied from interface:EventBinaryApiReplace the attached file (binary) to given event ID.- Specified by:
updateEventBinaryin interfaceEventBinaryApi- Parameters:
id- ID of eventbytes- file (binary) to be uploaded- Throws:
SDKException- if upload fails
-
deleteEventBinary
Description copied from interface:EventBinaryApiRemove stored file from given event ID.- Specified by:
deleteEventBinaryin interfaceEventBinaryApi- Parameters:
eventId- ID of event- Throws:
SDKException- if delete fails
-