Package org.teamapps.ux.resource
Class ResourceWrapper
java.lang.Object
org.teamapps.ux.resource.ResourceWrapper
- All Implemented Interfaces:
Resource
public class ResourceWrapper extends java.lang.Object implements Resource
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ResourceWrapper(Resource delegate) -
Method Summary
Modifier and Type Method Description java.io.FilegetAsFile()java.util.DategetExpires()java.io.InputStreamgetInputStream()java.util.DategetLastModified()longgetLength()java.lang.StringgetMimeType()java.lang.StringgetName()booleanisAttachment()ResourcelastModified(java.util.Date date)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.teamapps.ux.resource.Resource
asAttachment, expiring, withMimeType
-
Constructor Details
-
ResourceWrapper
-
-
Method Details
-
getInputStream
public java.io.InputStream getInputStream()- Specified by:
getInputStreamin interfaceResource
-
getLength
public long getLength() -
getName
public java.lang.String getName() -
getLastModified
public java.util.Date getLastModified()- Specified by:
getLastModifiedin interfaceResource
-
getExpires
public java.util.Date getExpires()- Specified by:
getExpiresin interfaceResource
-
getMimeType
public java.lang.String getMimeType()- Specified by:
getMimeTypein interfaceResource
-
isAttachment
public boolean isAttachment()- Specified by:
isAttachmentin interfaceResource- Returns:
- true if this resource should be handled by the browser by showing a "Save As" dialogue (HTTP header Content-Disposition: attachment), false if the browser should attempt to embed or display the resource directly (HTTP header Content-Disposition: inline).
-
getAsFile
public java.io.File getAsFile() -
lastModified
- Specified by:
lastModifiedin interfaceResource
-