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[] |
getContents() |
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 String getFileName()
getFileName in interface UploadedFilepublic InputStream getInputstream() throws IOException
getInputstream in interface UploadedFileIOExceptionpublic long getSize()
getSize in interface UploadedFilepublic byte[] getContents()
getContents in interface UploadedFilepublic String getContentType()
getContentType in interface UploadedFilepublic void write(String filePath) throws Exception
UploadedFilewrite in interface UploadedFilefilePath - The target file path.Exception - If something went wrong.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.StateHolderCopyright © 2018. All rights reserved.