org.apache.jetspeed.services.webpage
Class CachedResource

java.lang.Object
  extended byorg.apache.jetspeed.services.webpage.CachedResource

public class CachedResource
extends java.lang.Object

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

Version:
$Id: CachedResource.java,v 1.3 2004/02/23 03:46:26 jford Exp $
Author:
David Sean Taylor

Constructor Summary
CachedResource(int contentType, byte[] content)
          Constructor for a cached resource.
 
Method Summary
 byte[] getContent()
          Gets the content of this resource in a byte array.
 int getContentType()
          Accessor to get the content type for this resource as defined in WebPageHelper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachedResource

public CachedResource(int contentType,
                      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.

getContentType

public int getContentType()
Accessor to get the content type for this resource as defined in WebPageHelper

Returns:
The content type for this resource.


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.