public class UploadedFileWrapper extends Object implements UploadedFile, javax.faces.FacesWrapper<UploadedFile>, javax.faces.component.StateHolder
| Constructor and Description |
|---|
UploadedFileWrapper() |
UploadedFileWrapper(UploadedFile wrapped) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getContent() |
String |
getContentType() |
String |
getFileName() |
InputStream |
getInputStream() |
long |
getSize() |
UploadedFile |
getWrapped() |
boolean |
isTransient() |
void |
restoreState(javax.faces.context.FacesContext fc,
Object o) |
Object |
saveState(javax.faces.context.FacesContext fc) |
void |
setTransient(boolean value) |
void |
write(String filePath)
Writes the uploaded file to the given file path.
|
public UploadedFileWrapper()
public UploadedFileWrapper(UploadedFile wrapped)
public UploadedFile getWrapped()
getWrapped in interface javax.faces.FacesWrapper<UploadedFile>public Object saveState(javax.faces.context.FacesContext fc)
saveState in interface javax.faces.component.StateHolderpublic void restoreState(javax.faces.context.FacesContext fc,
Object o)
restoreState in interface javax.faces.component.StateHolderpublic boolean isTransient()
isTransient in interface javax.faces.component.StateHolderpublic void setTransient(boolean value)
setTransient in interface javax.faces.component.StateHolderpublic long getSize()
getSize in interface UploadedFilepublic void write(String filePath) throws Exception
UploadedFilewrite in interface UploadedFilefilePath - The target file path.Exception - If something went wrong.public String getFileName()
getFileName in interface UploadedFilepublic InputStream getInputStream() throws IOException
getInputStream in interface UploadedFileIOExceptionpublic byte[] getContent()
getContent in interface UploadedFilepublic String getContentType()
getContentType in interface UploadedFileCopyright © 2020. All rights reserved.