On Wed, 10 Dec 2003 07:40:43 -0800
Christopher Oliver <[EMAIL PROTECTED]> wrote:

> var BUFSIZE = 8192;
> // You can allocate a Java byte array like this
> var buf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, BUFSIZE);
> var os = new java.io.ByteArrayOutputStream();
> var count;
> while ((count = result.read(buf, 0, buf.length)) > 0) {
>       os.write(buf, 0, count);
> }
> os.flush();
> var image = os.toByteArray();
>  

Hi Christopher,

thank's a lot for the example, it helped a lot figuring out how to store an uploaded 
file.

For the image retrieval  I'm' using now the Databasereader

http://cocoon.apache.org/2.1/userdocs/readers/database-reader.html

which is quite handy.


Regards jörn

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to