jakarta-jcs-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Maclean <stu...@apl.washington.edu>
Subject Re: Can i store and fetchr aw blocks of bytes?
Date Wed, 26 Aug 2009 16:55:29 GMT
Hi Jeffrey, I am doing a similar thing to you. I get Image objects  
from remote URLs, then convert to int[] and store the int[] in JCS.  I  
really did this since Image is not serializable.

You could read all bytes from your handler until read returns -1,  
store all into a ByteArrayOutputStream, then call toByteArray on that  
and had the byte[] to JCS?

Stuart

On Aug 25, 2009, at 6:06 PM, Jeffrey Kesselman wrote:

> Hi Guys,
>
> Im trying to mate JCS at the moment with another system that expects  
> to
> access data as bytes vi a URL.  As sun Im writing a jcs protocol  
> handler.
>
> The problem is that, as alluded to above, a protocl handler expcts  
> to hand
> back its data as a byte stream.
>
> Is there a way to push thinsg into and take thinsg otu of the JCS  
> cache as
> blocks of bytes?
> -- 
> ~~ Microsoft help desk says: reply hazy, ask again later. ~~


---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org


Mime
View raw message