Package com.cognite.client.servicesV1
Class ConnectorServiceV1.FileWriter
java.lang.Object
com.cognite.client.servicesV1.ConnectorServiceV1.ConnectorBase
com.cognite.client.servicesV1.ConnectorServiceV1.FileWriter
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ConnectorServiceV1
Writes files (header + binary) to the Cognite API.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenableDeleteTempFile(boolean enable) Configure how to treat a temp blob after an upload.Writes file metadata and binaries and blocks the call until the file write completes.writeFileAsync(Request fileContainerRequest) Writes file metadata and binaries asynchronously.
-
Constructor Details
-
FileWriter
public FileWriter()
-
-
Method Details
-
enableDeleteTempFile
Configure how to treat a temp blob after an upload. This setting only affects behavior when uploading file binaries to the Cognite API--it has no effect on downloading file binaries. When set totrue, the temp file (if present) will be removed after a successful upload. If the file binary is memory-based (which is the default for small and medium sized files), this setting has no effect. When set tofalse, the temp file (if present) will not be deleted. The default setting istrue.- Parameters:
enable-- Returns:
-
writeFile
Writes file metadata and binaries and blocks the call until the file write completes. TheRequestParameterinput must contain a proto payload with aFileContainerobject which contains both the file metadata and the file binary.- Parameters:
fileContainerRequest-- Returns:
- Throws:
Exception
-
writeFileAsync
public CompletableFuture<ResponseItems<String>> writeFileAsync(Request fileContainerRequest) throws Exception Writes file metadata and binaries asynchronously. TheRequestParameterinput must contain a proto payload with aFileContainerobject which contains both the file metadata and the file binary.- Parameters:
fileContainerRequest-- Returns:
- Throws:
Exception
-