I'm probably making this way more complicated than it has to be. So if someone can maybe lend a hand..... I've been thinking about this for awhile now. I have accomplished converting to file name to all uppercase (Granted it was appended by some object data).
The homework states: write ChangeToUpperCaseInputStream class, which extends FilterInputStream. Write ChangeToUpperCaseOutputStream class, which extends FilterOutputStream. Use either ChangeToUpperCaseInputStream class or ChangeToUpperCaseOutputStream class to convert the characters read to upper case. Is the best way to accomplish this by: 1. Read the .txt file into a FileInputStream 2. convert the FileInputStream to a string 3. us the toUpperCase() method on the String 4. then convert to the string to a FileOutputStream 5. Finally write the FileOutputStream to a file Or 1. Read the .txt file into a FileInputStream 2. Create an InputStreamReader 3. Since this returns an integer value of the character. Change the value of the character to match its uppercase integer value 4. Then Using the InputStreamWriter object, write the value back out the Stream. The FilterInputStream, FilterOutputStream extend InputStream and OutStream overriding all the methods. But where is the additional functionality? I understand I/O is a very important concept to grasp. So if anyone could help me understand a better, and mabe point me in the write direction. -- 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
