Class FileWithMetadata.Builder
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.FileWithMetadata.Builder
-
- Enclosing class:
- FileWithMetadata
public static class FileWithMetadata.Builder extends java.lang.ObjectBuilder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileWithMetadatabuild()Builds a FileWithMetadata.FileWithMetadata.BuildercontentType(java.lang.String contentType)Set the contentType.FileWithMetadata.Builderdata(java.io.File file)Set the data.FileWithMetadata.Builderdata(java.io.InputStream data)Set the data.FileWithMetadata.Builderfilename(java.lang.String filename)Set the filename.
-
-
-
Constructor Detail
-
Builder
public Builder()
Instantiates a new builder.
-
Builder
public Builder(java.io.InputStream data)
Instantiates a new builder with required properties.- Parameters:
data- the data / contents of the file
-
Builder
public Builder(java.io.File file) throws java.io.FileNotFoundExceptionInstantiates a new builder with required properties.- Parameters:
file- the file to use as the source of file contents and filename- Throws:
java.io.FileNotFoundException- if the file could not be found
-
-
Method Detail
-
build
public FileWithMetadata build()
Builds a FileWithMetadata.- Returns:
- the fileWithMetadata
-
data
public FileWithMetadata.Builder data(java.io.InputStream data)
Set the data.- Parameters:
data- the data- Returns:
- the FileWithMetadata builder
-
filename
public FileWithMetadata.Builder filename(java.lang.String filename)
Set the filename.- Parameters:
filename- the filename- Returns:
- the FileWithMetadata builder
-
contentType
public FileWithMetadata.Builder contentType(java.lang.String contentType)
Set the contentType.- Parameters:
contentType- the contentType- Returns:
- the FileWithMetadata builder
-
data
public FileWithMetadata.Builder data(java.io.File file) throws java.io.FileNotFoundException
Set the data.- Parameters:
file- the file to use as the source of file contents and filename- Returns:
- the FileWithMetadata builder
- Throws:
java.io.FileNotFoundException- if the file could not be found
-
-