Class ConnectorServiceV1.FileWriter

    • Constructor Detail

      • FileWriter

        public FileWriter()
    • 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 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