Klasse CDOBlob


public final class CDOBlob extends CDOLob<InputStream>
An identifiable binary large object with streaming support.

CDOBlobs are immutable. Once created, their ID and size do not change. The ID is a digest of the content of the blob, SHA-1 by default (see CDOLobStoreImpl.DEFAULT_DIGEST_ALGORITHM).

CDOBlobs can be created from an InputStream, a byte[], or a hex-encoded String. On the client side, CDOBlobs are created with a reference to a CDOLobStore, which is used to store and retrieve the blob's content. On the server side, CDOBlobs are created without a store reference and are always retrieved from the repository's IStore.

The default CDOLobStore implementation is CDOLobStoreImpl.INSTANCE, which stores blobs in the local file system. But on the client side, it's often more efficient to use a dedicated CDOLobStore instance that stores blobs in a CDOSession-specific cache location. See CDOSession.Options.setLobCache(CDOLobStore) for details. See also CDOSession.newBlob(InputStream) and CDOSession.newBlob(byte[]) for convenient ways to create CDOBlobs.

Seit:
4.0
Autor:
Eike Stepper