public class WebResourceImpl extends Object implements WebResource
WebResource interface.| Constructor and Description |
|---|
WebResourceImpl(org.osgi.framework.Bundle bundle,
String library,
String fileName,
URL resourceURL,
org.osgi.framework.Version version,
String contentType)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
boolean |
equals(Object obj) |
org.osgi.framework.Bundle |
getBundle()
The bundle that offers the
WebResource. |
Map<ContentEncoding,Integer> |
getCacheState()
After a
WebResource is requested with a ContentEncoding, the content is cached
in the memory. |
long |
getContentLength(ContentEncoding contentEncoding)
The length of the content of the
WebResource in the specific ContentEncoding. |
String |
getContentType()
The content type of the
WebResource. |
String |
getETag()
The calculated ETag of the
WebResource that can be used to save bandwidth. |
String |
getFileName()
The fileName of the
WebResource. |
InputStream |
getInputStream(ContentEncoding contentEncoding,
int beginIndex)
Creates a new
InputStream to read the content of the WebResource. |
long |
getLastModified()
The date when the
WebResource was last modified. |
String |
getLastModifiedRFC1123GMT()
The RFC1123 GMT representation of the value of
WebResource.getLastModified(). |
String |
getLibrary()
The name of the library of the
WebResource. |
int |
getRawLength() |
org.osgi.framework.Version |
getVersion()
The exact version of the
WebResource. |
int |
hashCode() |
public WebResourceImpl(org.osgi.framework.Bundle bundle,
String library,
String fileName,
URL resourceURL,
org.osgi.framework.Version version,
String contentType)
bundle - The bundle that holds the WebResource.library - The library name of the WebResource.fileName - The name of the WebResource.resourceURL - The URL where the raw content of the WebResource is available.version - Version of the WebResource.contentType - The content type of the WebResource.public void destroy()
@Generated(value="eclipse") public boolean equals(Object obj)
public org.osgi.framework.Bundle getBundle()
WebResourceWebResource.getBundle in interface WebResourcepublic Map<ContentEncoding,Integer> getCacheState()
WebResourceWebResource is requested with a ContentEncoding, the content is cached
in the memory.getCacheState in interface WebResourceWebResource in the cache for each
ContentEncoding.public long getContentLength(ContentEncoding contentEncoding)
WebResourceWebResource in the specific ContentEncoding.getContentLength in interface WebResourcecontentEncoding - The ContentEncoding of the WebResource.public String getContentType()
WebResourceWebResource.getContentType in interface WebResourcepublic String getETag()
WebResourceWebResource that can be used to save bandwidth.getETag in interface WebResourcepublic String getFileName()
WebResourceWebResource.getFileName in interface WebResourcepublic InputStream getInputStream(ContentEncoding contentEncoding, int beginIndex) throws IOException
WebResourceInputStream to read the content of the WebResource.getInputStream in interface WebResourcecontentEncoding - The ContentEncoding that we should get the data with.beginIndex - The beginning inded of the content.InputStream.IOException - if a read error occures.public long getLastModified()
WebResourceWebResource was last modified. This is normally the date of the
resource within the bundle.getLastModified in interface WebResourcepublic String getLastModifiedRFC1123GMT()
WebResourceWebResource.getLastModified(). This is normally
used to pass the Last-Modified response header value.getLastModifiedRFC1123GMT in interface WebResourcepublic String getLibrary()
WebResourceWebResource. E.g.: jquery.getLibrary in interface WebResourcepublic int getRawLength()
public org.osgi.framework.Version getVersion()
WebResourceWebResource.getVersion in interface WebResource@Generated(value="eclipse") public int hashCode()
Copyright © 2011–2017 Everit Kft.. All rights reserved.