public class NativeUploadedFile extends Object implements UploadedFile, Serializable
Constructor and Description |
---|
NativeUploadedFile() |
NativeUploadedFile(List<javax.servlet.http.Part> parts,
FileUpload fileUpload) |
NativeUploadedFile(javax.servlet.http.Part part,
FileUpload fileUpload) |
Modifier and Type | Method and Description |
---|---|
protected String |
getContentDispositionFileName(String line) |
byte[] |
getContents() |
String |
getContentType() |
String |
getFileName() |
List<String> |
getFileNames() |
InputStream |
getInputstream() |
javax.servlet.http.Part |
getPart() |
long |
getSize() |
void |
write(String filePath)
Writes the uploaded file to the given file path.
|
public NativeUploadedFile()
public NativeUploadedFile(javax.servlet.http.Part part, FileUpload fileUpload)
public NativeUploadedFile(List<javax.servlet.http.Part> parts, FileUpload fileUpload)
public String getFileName()
getFileName
in interface UploadedFile
public List<String> getFileNames()
getFileNames
in interface UploadedFile
public InputStream getInputstream() throws IOException
getInputstream
in interface UploadedFile
IOException
public long getSize()
getSize
in interface UploadedFile
public byte[] getContents()
getContents
in interface UploadedFile
public String getContentType()
getContentType
in interface UploadedFile
public void write(String filePath) throws Exception
UploadedFile
write
in interface UploadedFile
filePath
- The target file path.Exception
- If something went wrong.public javax.servlet.http.Part getPart()
Copyright © 2019. All rights reserved.