I was talking about the adler32 at the online exercise. It doesn't do
any filtering, it just calculates the checksum. Since whats being
filtered isnt modified in any way, and you need to do the same being
that you do it at "in" or "out", the code is written just once and
both clases uses it.

As for the homework exercise, as I have seen, what's usually meant is
that when you read 'a' you'll get 'A' by wrapping the "in"; or that
when you write 'a', it'll be 'A' whats actually written at 'out'. It's
like...

'a' -> Filter -> 'A' is what's actually read - some code uses 'A'

or..

some code produces 'a' - write 'a' -> Filter at out-> 'A' is written

... It can be done easily at ChangeToUpperCaseInputStream class or
ChangeToUpperCaseOutputStream class. It can be improved too by
unifying the common code but we have to take into account that we are
actually modifying what's read or written. When you read there isn't
any trouble but when you write, you have to filter what's being
written without actually making any modification to the array thats
being passed as argument.

Diego

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to