|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.api.impl.blob.AbstractBlob org.nuxeo.ecm.core.api.impl.blob.StreamBlob org.nuxeo.ecm.core.api.impl.blob.DefaultStreamBlob org.nuxeo.ecm.core.storage.sql.coremodel.SQLBlob
public class SQLBlob
A Blob
wrapping a Binary
value.
Field Summary | |
---|---|
static boolean |
IS_STREAMING_ENABLED
By default the SQLBlob is remotable through Nuxeo streaming service. |
Fields inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlob |
---|
EMPTY_BYTE_ARRAY, EMPTY_INPUT_STREAM, EMPTY_READER, EMPTY_STRING |
Constructor Summary | |
---|---|
SQLBlob(Binary binary,
String filename,
String mimeType,
String encoding,
String digest)
|
Method Summary | |
---|---|
Binary |
getBinary()
|
long |
getLength()
Gets the data length in bytes if known. |
InputStream |
getStream()
|
boolean |
isPersistent()
Checks whether this blob is persistent. |
Blob |
persist()
Persist this stream so that Blob.getStream() method can be called
successfully several times. |
Object |
writeReplace()
Replace this object with a StreamingBlob when serialized. |
Methods inherited from class org.nuxeo.ecm.core.api.impl.blob.DefaultStreamBlob |
---|
getDigest, getEncoding, getFilename, getMimeType, setDigest, setEncoding, setFilename, setMimeType |
Methods inherited from class org.nuxeo.ecm.core.api.impl.blob.StreamBlob |
---|
asByteArrayBlob, asStringBlob, getByteArray, getReader, getString, readBytes, readBytes, readString |
Methods inherited from class org.nuxeo.ecm.core.api.impl.blob.AbstractBlob |
---|
copy, copy, transferTo, transferTo, transferTo |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean IS_STREAMING_ENABLED
org.nuxeo.ecm.core.storage.sql.blob_streaming = false
This way the blob will use the default serialization (file serialization) that is optimized for
servers that are using a shared file system (and not nuxeo streaming)
Constructor Detail |
---|
public SQLBlob(Binary binary, String filename, String mimeType, String encoding, String digest)
Method Detail |
---|
public long getLength()
Blob
getLength
in interface Blob
getLength
in class StreamBlob
public InputStream getStream() throws IOException
getStream
in interface Blob
IOException
public boolean isPersistent()
Blob
Blob.getStream()
can be
successfully called several times).
isPersistent
in interface Blob
public Blob persist()
Blob
Blob.getStream()
method can be called
successfully several times. The persistence is done in a temporary file
or in memory - this is up to the implementation.
Blobs that are already persistent return themselves.
Persistence should update the internal structure of the Blob to make it persistent whenever possible and hence return itself whenever possible. This behavior cannot be guaranteed by every implementation however.
persist
in interface Blob
public Binary getBinary()
public Object writeReplace() throws ObjectStreamException
StreamingBlob
when serialized.
The StreamingBlob object can be sent to remote machines through nuxeo streaming mechanism.
If IS_STREAMING_ENABLED is false then no replace takes place.
ObjectStreamException
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |