|
Java™ by example!
|
|
|
How do I create an OutputStream that manipulates the data written to it?
Create a class that extends from FilterOutputStream and override the method write in which you convert the original value to a new value. Following example introduces the ChangeCaseOutputStream which will convert any character to uppercase or lowercase depending on how you instantiated the class. Main.java:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|