net.sf.ehcache
Class MimeTypeByteArray
java.lang.Object
net.sf.ehcache.MimeTypeByteArray
- All Implemented Interfaces:
- Serializable
public class MimeTypeByteArray
- extends Object
- implements 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MimeTypeByteArray
public MimeTypeByteArray()
- Empty constructor, as required for JavaBeans
MimeTypeByteArray
public MimeTypeByteArray(String mimeType,
byte[] value)
- Full constructor
- Parameters:
mimeType
- any String that provides information as to the type of the valuevalue
- an arbitrary binary value.
getMimeType
public String getMimeType()
- Returns:
- a String that provides information as to the type of the value
setMimeType
public void setMimeType(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.
Copyright 2001-2017, Terracotta, Inc.