Interface PlainFileBuilder
- All Superinterfaces:
DataContentBuilder<PlainContent>
- All Known Implementing Classes:
PlainFileBuilder.DefaultPlainFileBuilder
Builder interface for constructing
PlainContent instances that
represent unencrypted file-based content sourced from a URL.
This builder allows specifying the source URL of a file to be used as plain (non-encrypted) content. It is typically used as input for cryptographic operations or for representing raw file data.
The DataContentBuilder.build(boolean) method accepts an encrypt flag to comply
with the DataContentBuilder interface; however, this flag is ignored
for plain content types.
Usage example:
PlainContent plainFile = PlainFileBuilder.builder()
.url(new URL("file:///path/to/file.txt"))
.build(true); // encrypt flag is ignored for PlainFile
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classDefault implementation of thePlainFileBuilderinterface. -
Method Summary
Modifier and TypeMethodDescriptionstatic PlainFileBuilderbuilder()Creates a new instance of the default builder implementation.Sets the URL of the file to be used as the plain content source.Methods inherited from interface DataContentBuilder
build
-
Method Details
-
url
Sets the URL of the file to be used as the plain content source.- Parameters:
url- the URL of the file; must not benull- Returns:
- this builder instance
-
builder
Creates a new instance of the default builder implementation.- Returns:
- a new
PlainFileBuilder
-