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() |
List<String> |
getFileNames() |
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 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 UploadedFile getWrapped()
getWrapped
in interface javax.faces.FacesWrapper<UploadedFile>
public Object saveState(javax.faces.context.FacesContext fc)
saveState
in interface javax.faces.component.StateHolder
public void restoreState(javax.faces.context.FacesContext fc, Object o)
restoreState
in interface javax.faces.component.StateHolder
public boolean isTransient()
isTransient
in interface javax.faces.component.StateHolder
public void setTransient(boolean value)
setTransient
in interface javax.faces.component.StateHolder
Copyright © 2019. All rights reserved.