On 5/28/07, James Im <[EMAIL PROTECTED]> wrote:

Very good tutorial!

I've just seen a little typo in the remarks about the ImageResponse
Decoder. It says: "the first PICE of data is handled by thread-1".


thanks, I fixed it.

While reading your tutorial I was wondering what you would do if the
image to be sent was very big, so big that it wouldn't fit in memory and
must be streamed to and from the hard disk.


Interesting question, I wondered myself.
I guess it depends on the protocol and the concrete scenario.
The StreamWriteFilter might be useful, I haven't tried it yet.

http://mina.apache.org/report/trunk/apidocs/org/apache/mina/filter/StreamWriteFilter.html
Opening an FileOutputStream in your decoder, and writing all incoming data
to it would work, I guess.
And when the image is completely written to disk, close the stream and write
a java.io.File object to the ProtocolDecoderOutput ?
I'll try it.

Actually, I am thinking about implementing a MINA-based TFTP client and
server, to illustrate the DemuxingProtocolCodecFactory.

Maarten

On 5/28/07, Maarten Bosteels <[EMAIL PROTECTED]> wrote:
>>Hello all,
>>
>>I created a tutorial on creating a custom ProtocolCodecFilter.
>>Please have a look at it and let me know what you think:
>>
>>http://cwiki.apache.org/confluence/display/MINA/Tutorial on
>>ProtocolCodecFilter

_________________________________________________________________
Opret en personlig blog og del dine billeder på MSN Spaces:
http://spaces.msn.com/


Reply via email to