Package net.sf.ehcache
Class MimeTypeByteArray
- java.lang.Object
-
- net.sf.ehcache.MimeTypeByteArray
-
- All Implemented Interfaces:
java.io.Serializable
public class MimeTypeByteArray extends java.lang.Object implements java.io.SerializableA 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
Constructors Constructor Description MimeTypeByteArray()Empty constructor, as required for JavaBeansMimeTypeByteArray(java.lang.String mimeType, byte[] value)Full constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMimeType()byte[]getValue()voidsetMimeType(java.lang.String mimeType)voidsetValue(byte[] value)
-
-
-
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 valuevalue- 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.
-
-