public interface UploadedFile
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Returns the content type of the file.
|
InputStream |
getInputStream()
Returns the file data, as an
InputStream . |
String |
getName()
Returns the original file name (from client).
|
long |
length()
Returns the length of file, in bytes.
|
void |
writeTo(File pFile)
Writes the file data to the given
File . |
long length()
String getName()
String getContentType()
InputStream getInputStream() throws IOException
InputStream
.
The file data may be read from disk, or from an in-memory source,
depending on implementation.InputStream
containing the file dataIOException
RuntimeException
void writeTo(File pFile) throws IOException
File
.
Note that implementations are free to optimize this to a rename
operation, if the file is allready cached to disk.pFile
- the File
(file name) to write to.IOException
RuntimeException
Copyright © 2017. All rights reserved.