Hi
// Custom InputStream
public class ChangeToUpperCaseInputStream extends FilterInputStream {
private Checkcase ckcase;
public ChangeToUpperCaseInputStream(InputStream in, Checkcase ckcase) {
super(in);
this.ckcase = ckcase;
}
public int read() throws IOException {
int b = in.read();
if (b != -1) {
ckcase.update(b);
}
return b;
I have trouble understand this. FilterInputStream class only read byte not
character.
I sent byte to ckcase.update. I collect bytes there? But not know if byte
make character again? Maybe override toString in this class and make byte to
string? I little confusing.
Thank you in advance for help me.
Zhao
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---