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 TypeMethodDescriptionvoid
createEventBinary
(String id, byte[] bytes) Upload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.void
deleteEventBinary
(String eventId) Remove stored file from given event ID.getEventBinary
(String eventId) Download a stored file from given event ID.void
updateEventBinary
(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:EventBinaryApi
Download a stored file from given event ID.- Specified by:
getEventBinary
in interfaceEventBinaryApi
- Parameters:
eventId
- ID of event- Returns:
- file (binary)
- Throws:
SDKException
- if download fails
-
createEventBinary
Description copied from interface:EventBinaryApi
Upload a file (binary) with content-type of "application/octet-stream" (default) to given event ID.- Specified by:
createEventBinary
in interfaceEventBinaryApi
- Parameters:
id
- ID of eventbytes
- file (binary) to be uploaded- Throws:
SDKException
- if upload fails
-
updateEventBinary
Description copied from interface:EventBinaryApi
Replace the attached file (binary) to given event ID.- Specified by:
updateEventBinary
in interfaceEventBinaryApi
- Parameters:
id
- ID of eventbytes
- file (binary) to be uploaded- Throws:
SDKException
- if upload fails
-
deleteEventBinary
Description copied from interface:EventBinaryApi
Remove stored file from given event ID.- Specified by:
deleteEventBinary
in interfaceEventBinaryApi
- Parameters:
eventId
- ID of event- Throws:
SDKException
- if delete fails
-