public static final class File.Builder
extends java.lang.Object
File.
Builders are created by invoking File.newBuilder(). Each of the setter methods modifies
the state of the builder and returns the same instance. Builders are not thread-safe and
should not be used concurrently from multiple threads without external synchronization.
| Modifier and Type | Method and Description |
|---|---|
File |
build()
Returns a new
File instance built from the current state of this builder. |
File.Builder |
bytesValue(byte[] bytes)
Sets the byte sequence representing the file upload data segment.
|
File.Builder |
contentType(java.lang.String contentType)
Sets the file content type determined by the file extension.
|
File.Builder |
name(java.lang.String name) |
File.Builder |
pathValue(java.nio.file.Path path)
Sets the file path.
|
public File.Builder name(java.lang.String name)
public File.Builder contentType(java.lang.String contentType)
contentType - the file content type determined by the file extensionpublic File.Builder pathValue(java.nio.file.Path path)
path - the file pathpublic File.Builder bytesValue(byte[] bytes)
bytes - the byte sequence representing the file upload data segment