james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: new InputStream class for mail data
Date Wed, 16 Jul 2003 23:22:37 GMT
> Thank you again, Noel, for calling my attention to FilterInputStream.

You're welcome.

> In the particular case with SMTPDataInputStream [...]

In the case of SMTPDataInputStream, we would not want to call close(), which
is why no one does.  :-)

> As I describe in the comment at the end of class SMTPDataInputStream,
> this implementation relies upon the behavior of the two InputStream
> methods read(byte[]) and read(byte[], int, int) which work by making
> repeated calls to the read() method

You would override read(byte[], int, int) to implement the required
behavior.  That is easy enough, and FilterInputStream.read(byte[]) is fine.

Perhaps FilterInputStream.read(byte[], int, int) should have been left
unchanged to call the core read() method, and required a specialized class
to call the delegated stream if desired, but that would not have been
consistent.  One would have to ask Sun what they were thinking.

	--- Noel

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message