Class FileTransformerConfiguration
java.lang.Object
software.amazon.awssdk.core.FileTransformerConfiguration
- All Implemented Interfaces:
ToCopyableBuilder<FileTransformerConfiguration.Builder,
FileTransformerConfiguration>
public final class FileTransformerConfiguration
extends Object
implements ToCopyableBuilder<FileTransformerConfiguration.Builder,FileTransformerConfiguration>
Configuration options for
AsyncResponseTransformer.toFile(Path, FileTransformerConfiguration)
to configure how the SDK
should write the file and if the SDK should delete the file when an exception occurs.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static enum
Defines how the SDK should handle the file if there is an exceptionstatic enum
Defines how the SDK should write the file -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create aFileTransformerConfiguration.Builder
, used to create aFileTransformerConfiguration
.static FileTransformerConfiguration
Returns the defaultFileTransformerConfiguration
forFileTransformerConfiguration.FileWriteOption.CREATE_NEW
static FileTransformerConfiguration
static FileTransformerConfiguration
Returns the defaultFileTransformerConfiguration
forFileTransformerConfiguration.FileWriteOption.CREATE_OR_REPLACE_EXISTING
boolean
The configuredExecutorService
the writes should be executed on.The configuredFileTransformerConfiguration.FailureBehavior
The configuredFileTransformerConfiguration.FileWriteOption
int
hashCode()
position()
Exclusively used withFileTransformerConfiguration.FileWriteOption.WRITE_TO_POSITION
.Take this object and create a builder that contains all of the current property values of this object.toString()
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
fileWriteOption
The configuredFileTransformerConfiguration.FileWriteOption
-
failureBehavior
The configuredFileTransformerConfiguration.FailureBehavior
-
executorService
The configuredExecutorService
the writes should be executed on.If not set, the default thread pool defined by the underlying
FileSystemProvider
will be used. This will typically be the thread pool defined by theAsynchronousChannelGroup
. -
position
Exclusively used withFileTransformerConfiguration.FileWriteOption.WRITE_TO_POSITION
. Configures the position, where to start writing to the existing file. The location correspond to the first byte where new data will be written. For example, if128
is configured, bytes 0-127 of the existing file will remain untouched and data will be written starting at byte 128. If not specified, defaults to 0.- Returns:
- The offset at which to start overwriting data in the file.
-
builder
Create aFileTransformerConfiguration.Builder
, used to create aFileTransformerConfiguration
. -
defaultCreateNew
Returns the defaultFileTransformerConfiguration
forFileTransformerConfiguration.FileWriteOption.CREATE_NEW
Always create a new file. If the file already exists,
FileAlreadyExistsException
will be thrown. In the event of an error, the SDK will attempt to delete the file (whatever has been written to it so far). -
defaultCreateOrReplaceExisting
Returns the defaultFileTransformerConfiguration
forFileTransformerConfiguration.FileWriteOption.CREATE_OR_REPLACE_EXISTING
Create a new file if it doesn't exist, otherwise replace the existing file. In the event of an error, the SDK will NOT attempt to delete the file, leaving it as-is
-
defaultCreateOrAppend
Returns the defaultFileTransformerConfiguration
forFileTransformerConfiguration.FileWriteOption.CREATE_OR_APPEND_TO_EXISTING
Create a new file if it doesn't exist, otherwise append to the existing file. In the event of an error, the SDK will NOT attempt to delete the file, leaving it as-is
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<FileTransformerConfiguration.Builder,
FileTransformerConfiguration> - Returns:
- a builder for type T
-
equals
-
hashCode
-
toString
-