Package org.primefaces.model.file
Class UploadedFileWrapper
java.lang.Object
org.primefaces.model.file.UploadedFileWrapper
- All Implemented Interfaces:
Serializable
,javax.faces.component.StateHolder
,javax.faces.FacesWrapper<UploadedFile>
,UploadedFile
public class UploadedFileWrapper
extends Object
implements UploadedFile, javax.faces.FacesWrapper<UploadedFile>, javax.faces.component.StateHolder, Serializable
Internal wrapper to avoid the file binaries to beeing saved in the ViewState.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
byte[]
long
getSize()
boolean
void
restoreState
(javax.faces.context.FacesContext fc, Object o) saveState
(javax.faces.context.FacesContext fc) void
setTransient
(boolean value) void
-
Constructor Details
-
UploadedFileWrapper
public UploadedFileWrapper() -
UploadedFileWrapper
-
-
Method Details
-
getWrapped
- Specified by:
getWrapped
in interfacejavax.faces.FacesWrapper<UploadedFile>
-
saveState
- Specified by:
saveState
in interfacejavax.faces.component.StateHolder
-
restoreState
- Specified by:
restoreState
in interfacejavax.faces.component.StateHolder
-
isTransient
public boolean isTransient()- Specified by:
isTransient
in interfacejavax.faces.component.StateHolder
-
setTransient
public void setTransient(boolean value) - Specified by:
setTransient
in interfacejavax.faces.component.StateHolder
-
getSize
public long getSize()- Specified by:
getSize
in interfaceUploadedFile
-
write
- Specified by:
write
in interfaceUploadedFile
- Throws:
Exception
-
getFileName
- Specified by:
getFileName
in interfaceUploadedFile
-
getWebkitRelativePath
- Specified by:
getWebkitRelativePath
in interfaceUploadedFile
-
getInputStream
- Specified by:
getInputStream
in interfaceUploadedFile
- Throws:
IOException
-
getContent
public byte[] getContent()- Specified by:
getContent
in interfaceUploadedFile
-
getContentType
- Specified by:
getContentType
in interfaceUploadedFile
-
delete
- Specified by:
delete
in interfaceUploadedFile
- Throws:
IOException
-