How can I stream blobs to/from entities?
How can I stream blobs to/from entities?
- Subject: How can I stream blobs to/from entities?
- From: Serge Froment <email@hidden>
- Date: Mon, 12 Apr 2004 16:03:55 -0400
Hi,
In a WebObjects 5.2 project, I need to store large blobs of data in a
database and my web application needs to let the user upload/download
those. I want to code accessors for my entity that use
InputStream/OutputStream instead of NSData so the data will not fill up
memory.
class MyEntity extends EOEnterpriseObject
{
(...)
public InputStream myBlobAttribute()
{
(...)
}
public void setMyBlobAttribute(OutputStream stream)
{
(...)
}
}
What I need to know is how I can connect to the database using a
java.sql.Connection instance to stream the data to/from the database. I
don't want to create a new connection each time because establishing a
new connection is costly, but I can't figure out how I can reach the
existing connection that WebObjects maintains and use it in an
EOF-friendly manner.
Serge Froment
http://www.serge-froment.com
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.