Top Description Fields Constructors Methods
net.sf.ehcache

public Class MimeTypeByteArray

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
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.

Author
Greg Luck
Version
$Id$

Field Summary

Modifier and TypeField and Description
private String
private byte[]

Constructor Summary

AccessConstructor and Description
public
MimeTypeByteArray()

Empty constructor, as required for JavaBeans

public
MimeTypeByteArray(String
any String that provides information as to the type of the value
mimeType
,
byte[]
an arbitrary binary value.
value
)

Full constructor

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a String that provides information as to the type of the value
getMimeType
()

public byte[]

Returns:

the value, which can be any arbitrary binary value.
getValue
()

public void
setMimeType(String
any String that provides information as to the type of the value
mimeType
)

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

mimeTypeback to summary
private String mimeType
valueback to summary
private byte[] value

Constructor Detail

MimeTypeByteArrayback to summary
public MimeTypeByteArray()

Empty constructor, as required for JavaBeans

MimeTypeByteArrayback to summary
public MimeTypeByteArray(String mimeType, byte[] value)

Full constructor

Parameters
mimeType:String

any String that provides information as to the type of the value

value:byte[]

an arbitrary binary value.

Method Detail

getMimeTypeback to summary
public String getMimeType()
Returns:String

a String that provides information as to the type of the value

getValueback to summary
public byte[] getValue()
Returns:byte[]

the value, which can be any arbitrary binary value.

See Also
getMimeType()
setMimeTypeback to summary
public void setMimeType(String mimeType)
Parameters
mimeType:String

any String that provides information as to the type of the value

setValueback to summary
public void setValue(byte[] value)
Parameters
value:byte[]

an arbitrary binary value.