Class FileBinaryResponseParser
java.lang.Object
com.cognite.client.servicesV1.response.FileBinaryResponseParser
- All Implemented Interfaces:
ResponseParser<FileBinary>
Parses a file binary based on a request and binary response payload.
The request parameters must contain a single item with either the *externalId* or the *id*. The response payload
represents the file binary.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FileBinaryResponseParsercreate()com.google.common.collect.ImmutableList<FileBinary>extractItems(byte[] payload) Extract the file binary from the response body.extractNextCursor(byte[] payload) ReturnsOptional.empty()as there is no next cursor in a file binary response.static FileBinaryResponseParserabstract FileBinaryResponseParser.BuilderwithRequest(Request requestParameters)
-
Constructor Details
-
FileBinaryResponseParser
public FileBinaryResponseParser()
-
-
Method Details
-
create
-
of
-
toBuilder
-
withRequest
-
extractNextCursor
ReturnsOptional.empty()as there is no next cursor in a file binary response.- Specified by:
extractNextCursorin interfaceResponseParser<FileBinary>- Parameters:
payload- The response body- Returns:
- Throws:
ExceptionIOException
-
extractItems
public com.google.common.collect.ImmutableList<FileBinary> extractItems(byte[] payload) throws Exception Extract the file binary from the response body.- Specified by:
extractItemsin interfaceResponseParser<FileBinary>- Parameters:
payload- The reponse body- Returns:
- Throws:
Exception
-