ehcache

net.sf.ehcache
Class MimeTypeByteArray

java.lang.Object
  extended by 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

Constructor Summary
MimeTypeByteArray()
          Empty constructor, as required for JavaBeans
MimeTypeByteArray(String mimeType, byte[] value)
          Full constructor
 
Method Summary
 String getMimeType()
           
 byte[] getValue()
           
 void setMimeType(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(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 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.

ehcache

Copyright 2001-2016, Terracotta, Inc.