public class InputStreamUploadSource extends Object implements UploadSource
Modifier and Type | Field and Description |
---|---|
private InputStream |
in |
private FileMetaData |
metadata |
private String |
name |
Constructor and Description |
---|
InputStreamUploadSource(String name,
InputStream in)
Create a new upload source from the existing input stream.
|
InputStreamUploadSource(String name,
InputStream in,
FileMetaData metadata)
Create a new upload source from the existing input stream
and file metadata.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Get an input stream for reading the resource data.
|
FileMetaData |
getMetadata()
Get a metadata instance with information about
the local file that is about to be uploaded.
|
String |
getName()
The name of the resource.
|
private final String name
private final InputStream in
private final FileMetaData metadata
public InputStreamUploadSource(String name, InputStream in)
public InputStreamUploadSource(String name, InputStream in, FileMetaData metadata)
public String getName()
UploadSource
getName
in interface UploadSource
public FileMetaData getMetadata()
UploadSource
UploadSource.getInputStream()
is called.getMetadata
in interface UploadSource
public InputStream getInputStream()
UploadSource
getInputStream
in interface UploadSource