I'm having some problems with this homework assignment as well. For some
reason, it doesnt like my BufferedReader. It returns a null. Any ideas?
import java.io.*;
public class ChangeToUpperCaseInputStream extends FilterInputOutputStream {
public ChangeToUpperCaseInputStream(){
super();
}
public void change() throws IOException {
try {
File inputFile = new File("words.txt");
System.out.println("inputFile : " + inputFile.toString());
FileReader in = new FileReader(inputFile);
System.out.println("reader : " + in.toString());
BufferedReader inputStream = new BufferedReader(in);
System.out.println("buffer : " + inputStream.toString());
String c;
while ((c = inputStream.readLine()) != null)
c.toUpperCase();
System.out.println(c);
in.close(); }
catch (EOFException e){
}
}
2009/4/20 miga <[email protected]>
>
>
>
> On Apr 16, 8:20 pm, Rafał Laczek <[email protected]> wrote:
> > Hello Friends,
> >
> > I try to make a homework but I have a problem.
> > I don't know how to finish my classes and then to display result in
> > mainclass FilterInputOutputStream.
> >
> That's a little too little, if I dare say so. main point is to
> understand the filters. If I remind well, there are tutorials on Sun
> about those classes, I recommand you to study them and make all the
> exercises.
> Then you will probably study also the streams, and particularly the
> read and write methods, also on Sun.
> With those two points cleared, browse the discussion group towards
> year 2007, you will be able to find some great discussions about this
> problem and at least begin to code a little more.
> Then somebody will help you.
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---