public interface MultipartFile
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Return the contents of the file as an array of bytes.
|
MediaType |
getContentType()
Return the content type of the file.
|
java.lang.String |
getFilename()
Return the original filename in the client's filesystem.
|
java.lang.String |
getName()
Return the name of the parameter in the multipart form.
|
long |
getSize()
Return the size of the file in bytes.
|
java.io.InputStream |
getStream()
Return an
InputStream to read the contents of the file from. |
boolean |
isEmpty()
Return whether the uploaded file is empty.
|
void |
transferTo(java.io.File dest)
Writing the received file to the given destination file.
|
java.lang.String getName()
java.lang.String getFilename()
FileItem#getName()MediaType getContentType()
boolean isEmpty()
long getSize()
byte[] getBytes()
throws java.io.IOException
java.io.IOException - in case of access errors (if the temporary store fails).java.io.InputStream getStream()
throws java.io.IOException
InputStream to read the contents of the file from.java.io.IOException - in case of access errors.void transferTo(java.io.File dest)
throws java.io.IOException,
java.lang.IllegalStateException
If the target file has been written to disk, this operation cannot be invoked again afterwards.
dest - the destination file.java.io.IOExceptionjava.lang.IllegalStateException