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

public abstract static class ConnectorServiceV1.FileWriter extends ConnectorServiceV1.ConnectorBase
Writes files (header + binary) to the Cognite API.
See Also:
  • Constructor Details

    • FileWriter

      public FileWriter()
  • Method Details

    • 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 to true, 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 to false, the temp file (if present) will not be deleted. The default setting is true.
      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. The RequestParameter input must contain a proto payload with a FileContainer object 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. The RequestParameter input must contain a proto payload with a FileContainer object which contains both the file metadata and the file binary.
      Parameters:
      fileContainerRequest -
      Returns:
      Throws:
      Exception