org.apache.jetspeed.portlet.webcontent
Class WebContentResource

java.lang.Object
  extended by org.apache.jetspeed.portlet.webcontent.WebContentResource
All Implemented Interfaces:
java.io.Serializable

public class WebContentResource
extends java.lang.Object
implements java.io.Serializable

A cached resource object, stored in memory to optimize access to static resources such as images and style sheets.

Version:
$Id: WebContentResource.java 517719 2007-03-13 15:05:48Z ate $
Author:
David Sean Taylor
See Also:
Serialized Form

Constructor Summary
WebContentResource(java.lang.String url, byte[] content)
          Constructor for a cached resource.
 
Method Summary
 byte[] getContent()
          Gets the content of this resource in a byte array.
 java.lang.String getLastUrl()
           
 java.lang.String getUrl()
           
 void setLastUrl(java.lang.String lastUrl)
           
 void setUrl(java.lang.String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebContentResource

public WebContentResource(java.lang.String url,
                          byte[] content)
Constructor for a cached resource.

Parameters:
contentType - The HTTP content type for a cached resource as defined in WebPageHelper, i.e. WebPageHelper.CT_HTML, WebPageHelper.CT_IMAGE....
content - The byte array of content this cached. This content can be binary images, or static text such as scripts and style sheets.
Method Detail

getContent

public byte[] getContent()
Gets the content of this resource in a byte array.

Returns:
A byte array of the resource's content.

getLastUrl

public java.lang.String getLastUrl()
Returns:
Returns the lastUrl.

setLastUrl

public void setLastUrl(java.lang.String lastUrl)
Parameters:
lastUrl - The lastUrl to set.

getUrl

public java.lang.String getUrl()
Returns:
Returns the url.

setUrl

public void setUrl(java.lang.String url)
Parameters:
url - The url to set.


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.