Package com.cognite.client.servicesV1
Class ConnectorServiceV1.FileWriter
- java.lang.Object
-
- com.cognite.client.servicesV1.ConnectorServiceV1.FileWriter
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ConnectorServiceV1
public abstract static class ConnectorServiceV1.FileWriter extends Object
Writes files (header + binary) to the Cognite API.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FileWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorServiceV1.FileWriterenableDeleteTempFile(boolean enable)Configure how to treat a temp blob after an upload.ResponseItems<String>writeFile(Request fileContainerRequest)Writes file metadata and binaries and blocks the call until the file write completes.CompletableFuture<ResponseItems<String>>writeFileAsync(Request fileContainerRequest)Writes file metadata and binaries asynchronously.
-
-
-
Method Detail
-
enableDeleteTempFile
public ConnectorServiceV1.FileWriter enableDeleteTempFile(boolean enable)
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
public ResponseItems<String> writeFile(Request fileContainerRequest) throws Exception
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
-
-