public class BlobImpl extends java.lang.Object implements Blob, java.lang.Cloneable, Db4oTypeImpl
| Modifier and Type | Field and Description |
|---|---|
static int |
COPYBUFFER_LENGTH |
java.lang.String |
fileName |
java.lang.String |
i_ext |
int |
i_length |
| Constructor and Description |
|---|
BlobImpl() |
| Modifier and Type | Method and Description |
|---|---|
int |
adjustReadDepth(int depth) |
java.lang.Object |
createDefault(Transaction a_trans) |
void |
deleteFile()
Deletes the current file stored in this BLOB.
|
java.io.FileInputStream |
getClientInputStream() |
java.io.FileOutputStream |
getClientOutputStream() |
java.lang.String |
getFileName()
returns the name of the file the blob was stored to.
|
int |
getLength() |
double |
getStatus()
returns the status after the last read- or write-operation.
|
void |
getStatusFrom(BlobStatus from) |
boolean |
hasClassIndex() |
void |
readFrom(java.io.File file)
reads a file into the db4o system and stores it as a blob.
|
void |
readLocal(java.io.File file)
reads a file into the db4o system and stores it as a blob.
|
java.io.File |
serverFile(java.lang.String promptName,
boolean writeToServer) |
void |
setObjectReference(ObjectReference objectReference) |
void |
setStatus(double status) |
void |
setTrans(Transaction a_trans) |
void |
writeLocal(java.io.File file)
writes stored blob data to a file.
|
void |
writeTo(java.io.File file)
writes stored blob data to a file.
|
public static final int COPYBUFFER_LENGTH
public java.lang.String fileName
public java.lang.String i_ext
public int i_length
public int adjustReadDepth(int depth)
depth - public java.lang.Object createDefault(Transaction a_trans)
createDefault in interface Db4oTypeImplpublic java.io.FileInputStream getClientInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic java.io.FileOutputStream getClientOutputStream()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getFileName()
BlobgetFileName in interface Blobpublic int getLength()
public double getStatus()
BlobStatus.UNUSED no data was ever stored to the Blob field.Status.AVAILABLE available data was previously stored to the Blob field.Status.QUEUED an operation was triggered and is waiting for it's turn in the Blob queue.Status.COMPLETED the last operation on this field was completed successfully.Status.PROCESSING for internal use only.Status.ERROR the last operation failed.Status constants defined in this interface or a double
between 0 and 1 that signifies the completion of the currently running operation.public void getStatusFrom(BlobStatus from)
public boolean hasClassIndex()
hasClassIndex in interface Db4oTypeImplpublic void readFrom(java.io.File file)
throws java.io.IOException
Blobpublic void readLocal(java.io.File file)
throws java.io.IOException
Blobpublic java.io.File serverFile(java.lang.String promptName,
boolean writeToServer)
throws java.io.IOException
java.io.IOExceptionpublic void setStatus(double status)
public void setTrans(Transaction a_trans)
setTrans in interface TransactionAwarepublic void writeLocal(java.io.File file)
throws java.io.IOException
BlobwriteLocal in interface Blobfile - the file the blob is to be written to.java.io.IOException - in case of errors and in case no blob
data was storedpublic void writeTo(java.io.File file)
throws java.io.IOException
Blobpublic void setObjectReference(ObjectReference objectReference)
setObjectReference in interface Db4oTypeImplpublic void deleteFile()
throws java.io.IOException
BlobdeleteFile in interface Blobjava.io.IOException - in case of errors and in case no
data was stored