Hello companion, I have the following problem in exercise I/O Stream, have
created the two classes, in the class read, with himself that the document
reads it changes and it to capital letters, but now not like following.
Somebody can help me please?
public class ChangeToUpperCaseInputStream extends FilterInputStream{
String b="";
public ChangeToUpperCaseInputStream (InputStream in){
super (in);
}
public StringBuilder StreamToUpper() {
BufferedReader buff = new BufferedReader(new InputStreamReader(super.in));
StringBuilder str = new StringBuilder();
String line = null;
try {
while((line=buff.readLine())!=null) {
str.append(line.toUpperCase() + "\n"); Here read a file and
change to uppercase, but how can i following???
}
return str;
} catch (IOException e) {}
return null;
}
public int read() throws IOException {
int c = StreamToUpper().read(); Here have a problem, because
requiere int
return c;
}
}
_________________________________________________________________
¡Quítate unos clics! Ahora, Internet Explorer 8 tiene todo lo que te gusta de
Windows Live ¡Consíguelo gratis!
http://ie8.msn.com/microsoft/internet-explorer-8/es-es/ie8.aspx
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---