ehcache

net.sf.ehcache
Class MimeTypeByteArray

java.lang.Object
  extended by net.sf.ehcache.MimeTypeByteArray
All Implemented Interfaces:
java.io.Serializable

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

A bean used to wrap byte[] values to be placed in an Element so as to preserve MIME type information.

This class provides the means to bypass Java's serialization mechanism to as to store anything that can be turned into bytes. It opens the way to non Java uses of ehcache.

Version:
$Id$
Author:
Greg Luck
See Also:
Serialized Form

Constructor Summary
MimeTypeByteArray()
          Empty constructor, as required for JavaBeans
MimeTypeByteArray(java.lang.String mimeType, byte[] value)
          Full constructor
 
Method Summary
 java.lang.String getMimeType()
           
 byte[] getValue()
           
 void setMimeType(java.lang.String mimeType)
           
 void setValue(byte[] value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MimeTypeByteArray

public MimeTypeByteArray()
Empty constructor, as required for JavaBeans


MimeTypeByteArray

public MimeTypeByteArray(java.lang.String mimeType,
                         byte[] value)
Full constructor

Parameters:
mimeType - any String that provides information as to the type of the value
value - an arbitrary binary value.
Method Detail

getMimeType

public java.lang.String getMimeType()
Returns:
a String that provides information as to the type of the value

setMimeType

public void setMimeType(java.lang.String mimeType)
Parameters:
mimeType - any String that provides information as to the type of the value

getValue

public byte[] getValue()
Returns:
the value, which can be any arbitrary binary value.
See Also:
getMimeType()

setValue

public void setValue(byte[] value)
Parameters:
value - an arbitrary binary value.

ehcache