goodslib
Class Blob

java.lang.Object
  extended bygoodsjpi.Persistent
      extended bygoodslib.Blob
All Implemented Interfaces:
java.io.Serializable

public class Blob
extends Persistent

Binary large object class. This class can be used as base for creating multimedia or text objects with large size and sequential access. This class provide functionality for incremental object loading by parallel task.

See Also:
Serialized Form

Field Summary
protected  byte[] data
           
protected  Blob last
           
protected  Blob next
           
 
Fields inherited from class goodsjpi.Persistent
defaultMetaobject, metaobject
 
Constructor Summary
Blob(byte[] buf)
           
Blob(int partSize)
           
 
Method Summary
 void append(Blob bp)
          Append new blob object at the end of blob objects chain.
protected  void fetched()
           
 boolean handle()
          This method is called by 'play' method for each part of blob object within conext of current task.
 void play()
          Default implementation of this method just extracts all parts of blob from database and calls handle method for each part.
 
Methods inherited from class goodsjpi.Persistent
attachToStorage, clone, clusterWith, finalize, getDatabase, getOid, getStorageId, hashCode, onLoad
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

protected Blob next

last

protected Blob last

data

protected byte[] data
Constructor Detail

Blob

public Blob(int partSize)

Blob

public Blob(byte[] buf)
Method Detail

handle

public boolean handle()
This method is called by 'play' method for each part of blob object within conext of current task. If this method returns False preloading process is terminated.


play

public void play()
Default implementation of this method just extracts all parts of blob from database and calls handle method for each part.


fetched

protected void fetched()

append

public void append(Blob bp)
Append new blob object at the end of blob objects chain.