public static class FileWithMetadata.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Instantiates a new builder.
|
Builder(java.io.File file)
Instantiates a new builder with required properties.
|
Builder(java.io.InputStream data)
Instantiates a new builder with required properties.
|
| Modifier and Type | Method and Description |
|---|---|
FileWithMetadata |
build()
Builds a FileWithMetadata.
|
FileWithMetadata.Builder |
contentType(java.lang.String contentType)
Set the contentType.
|
FileWithMetadata.Builder |
data(java.io.File file)
Set the data.
|
FileWithMetadata.Builder |
data(java.io.InputStream data)
Set the data.
|
FileWithMetadata.Builder |
filename(java.lang.String filename)
Set the filename.
|
public Builder()
public Builder(java.io.InputStream data)
data - the data / contents of the filepublic Builder(java.io.File file)
throws java.io.FileNotFoundException
file - the file to use as the source of file contents and filenamejava.io.FileNotFoundException - if the file could not be foundpublic FileWithMetadata build()
public FileWithMetadata.Builder data(java.io.InputStream data)
data - the datapublic FileWithMetadata.Builder filename(java.lang.String filename)
filename - the filenamepublic FileWithMetadata.Builder contentType(java.lang.String contentType)
contentType - the contentTypepublic FileWithMetadata.Builder data(java.io.File file) throws java.io.FileNotFoundException
file - the file to use as the source of file contents and filenamejava.io.FileNotFoundException - if the file could not be foundCopyright © 2022 IBM Cloud Developer Experience. All rights reserved.