public class FileValueBuilderImpl extends Object implements FileValueBuilder
Modifier and Type | Field and Description |
---|---|
protected FileValueImpl |
fileValue |
Constructor and Description |
---|
FileValueBuilderImpl(String filename) |
Modifier and Type | Method and Description |
---|---|
FileValue |
create() |
FileValueBuilder |
encoding(Charset encoding)
Sets the encoding for the file in the value infos (optional).
|
FileValueBuilder |
encoding(String encoding)
Sets the encoding for the file in the value infos (optional).
|
FileValueBuilder |
file(byte[] bytes)
Sets the value to the specified
Byte array |
FileValueBuilder |
file(File file)
Sets the value to the specified
File . |
FileValueBuilder |
file(InputStream stream)
Sets the value to the specified
InputStream . |
FileValueBuilder |
mimeType(String mimeType)
Saves the MIME type of a file in the value infos.
|
FileValueBuilder |
setTransient(boolean isTransient) |
protected FileValueImpl fileValue
public FileValueBuilderImpl(String filename)
public FileValue create()
create
in interface TypedValueBuilder<FileValue>
public FileValueBuilder mimeType(String mimeType)
FileValueBuilder
mimeType
in interface FileValueBuilder
mimeType
- the MIME type as stringpublic FileValueBuilder file(File file)
FileValueBuilder
File
.file
in interface FileValueBuilder
FileValueBuilder.file(byte[])
,
FileValueBuilder.file(InputStream)
public FileValueBuilder file(InputStream stream)
FileValueBuilder
InputStream
.file
in interface FileValueBuilder
FileValueBuilder.file(byte[])
,
FileValueBuilder.file(File)
public FileValueBuilder file(byte[] bytes)
FileValueBuilder
Byte
arrayfile
in interface FileValueBuilder
FileValueBuilder.file(File)
,
FileValueBuilder.file(InputStream)
public FileValueBuilder encoding(Charset encoding)
FileValueBuilder
encoding
in interface FileValueBuilder
public FileValueBuilder encoding(String encoding)
FileValueBuilder
encoding
in interface FileValueBuilder
public FileValueBuilder setTransient(boolean isTransient)
setTransient
in interface TypedValueBuilder<FileValue>
Copyright © 2019. All rights reserved.