Hi all,

If I understood right, dbforms serializes the FileHolder into the db. From the db you could get only its byte array (byte[]) representation.

If this is right, here there is a serialization utility class that could be used to:

- get the binary representation from the db
- unmarshall it into a Java object (then you should cast it to the right class)


http://pow2toolkit.sourceforge.net
http://pow2toolkit.sourceforge.net/xref/com/pow2/util/Serializer.html

see:

public static Object toObject(byte[] buf) throws Exception
public static byte[] toByteArray(Object obj) throws Exception

I hope to re-put my hands into DbForms soon... so at the moment I can't contribute with code.
Anyway, I think it could be possible to use the code above to make an utility class that get the FileHolder data from the db (passing the table key data as parameter).


Only my .2 euro ;^)

Luca

Shawn wrote:
I apologize,

You meant off track about

if I understand it correctly the BLOB support (not DISKBLOB) works with serializing a FileHolder into a database BLOB. The FileHolder contains the filename, mime type and binary content using a multp-
part request upload (or whatever this is called)


Sorry, um ...you know better than I. If the fileHolder reads it into bytes (ie byte[]), and then those bytes go via your driver into the database, is that serialized. It doesn't seem so to me in the java sence of the word.

Wouldn't that then be a normal blob in the database.

+) If the BLOBS are stored in the database I have 100% of my dynamic configuration in the DB and don't have to provide additional backup facilities.

So is what you're saying that you need a normal blob in the database so other apps can access that blob? Or that you want dbforms to provide access to the blob to other apps? Or am I completely off track about your train of thinking here?


Someone please correct me if I am wrong about the serialization, I just know the bytes go through my driver and doesn't jive with the little I know about java serialization. (had a driver getByte can't find FileHolder class error once)





-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to