Class BlobObject
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.db.object.objects.BlobObject
- All Implemented Interfaces:
Serializable
public class BlobObject extends ExperimentObject
Class used to store entire objects in the database as a blob.
- Author:
- dominik.kopczynski
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BlobObject()
Constructor.BlobObject(byte[] blob)
Constructor.BlobObject(Object object)
Constructor. -
Method Summary
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Field Details
-
getBlob
Object representation of the blob.
-
-
Constructor Details
-
BlobObject
Constructor.- Parameters:
object
- the object represented in this blob.- Throws:
IOException
- exception thrown whenever an error occurred while getting the byte representation of the object
-
BlobObject
public BlobObject()Constructor. -
BlobObject
public BlobObject(byte[] blob)Constructor.- Parameters:
blob
- the byte representation of the object.
-
-
Method Details
-
setBlob
public void setBlob(byte[] blob)Sets the byte representation of the object.- Parameters:
blob
- the blob as byte array
-
getBlob
public byte[] getBlob()Returns the byte representation of the object.- Returns:
- the byte representation of the object
-
unBlob
Returns the object represented by this blob.- Returns:
- the object represented by this blob
- Throws:
IOException
- exception thrown whenever an error occurred while reading the object from its byte representation
-