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 interfacestatic enumDefines how the SDK should handle the file if there is an exceptionstatic enumDefines how the SDK should write the file -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create aFileTransformerConfiguration.Builder, used to create aFileTransformerConfiguration.static FileTransformerConfigurationReturns the defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_NEWstatic FileTransformerConfigurationstatic FileTransformerConfigurationReturns the defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_OR_REPLACE_EXISTINGbooleanThe configuredExecutorServicethe writes should be executed on.The configuredFileTransformerConfiguration.FailureBehaviorThe configuredFileTransformerConfiguration.FileWriteOptioninthashCode()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 configuredExecutorServicethe writes should be executed on.If not set, the default thread pool defined by the underlying
FileSystemProviderwill 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, if128is 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 defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_NEWAlways create a new file. If the file already exists,
FileAlreadyExistsExceptionwill 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 defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_OR_REPLACE_EXISTINGCreate 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 defaultFileTransformerConfigurationforFileTransformerConfiguration.FileWriteOption.CREATE_OR_APPEND_TO_EXISTINGCreate 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:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<FileTransformerConfiguration.Builder,FileTransformerConfiguration> - Returns:
- a builder for type T
-
equals
-
hashCode
-
toString
-