Class 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 Details

    • getBlob

      public Object getBlob
      Object representation of the blob.
  • Constructor Details

    • BlobObject

      public BlobObject​(Object object) throws IOException
      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

      public Object unBlob() throws IOException
      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