com.cc.framework.resource
Class BinaryResource

java.lang.Object
  extended bycom.cc.framework.resource.Resource
      extended bycom.cc.framework.resource.BinaryResource
All Implemented Interfaces:
java.io.Serializable

public class BinaryResource
extends Resource

This class represent a binary Web-Resource

Since:
1.0
Version:
$Revision: 1.15 $
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  byte[] body
          Resource data
private static long serialVersionUID
          Serial Version UID
private  MimeType type
          MIME type of the Resource
 
Fields inherited from class com.cc.framework.resource.Resource
 
Constructor Summary
BinaryResource(MimeType type, byte[] body, Cachable cacheInfo)
          Constructor for BinaryResource
BinaryResource(MimeType type, java.lang.String bodyStream, Cachable cacheInfo)
          Constructor for BinaryResource
 
Method Summary
 boolean allowCompression()
          Checks if the Resource can be packed.
 byte[] getBody()
          Returns the resource data
 MimeType getType()
          Gets the Type
 java.lang.String toString()
           
 
Methods inherited from class com.cc.framework.resource.Resource
isCacheOnDisk, isUpToDate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

type

private MimeType type
MIME type of the Resource


body

private byte[] body
Resource data

Constructor Detail

BinaryResource

public BinaryResource(MimeType type,
                      byte[] body,
                      Cachable cacheInfo)
Constructor for BinaryResource

Parameters:
type - MimeType
body - Resource Data
cacheInfo - Cachable

BinaryResource

public BinaryResource(MimeType type,
                      java.lang.String bodyStream,
                      Cachable cacheInfo)
Constructor for BinaryResource

Parameters:
type - MimeType
bodyStream - Resource Data
cacheInfo - Cachable
Method Detail

getBody

public byte[] getBody()
Returns the resource data

Returns:
byte

getType

public MimeType getType()
Gets the Type

Returns:
Returns a MimeType

allowCompression

public boolean allowCompression()
Checks if the Resource can be packed. At this Time that depends on the MimeType

Returns:
boolean

toString

public java.lang.String toString()
See Also:
Object.toString()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.