|
Java™ by example!
|
|
|
How do I create an InputStream that returns a filtered version of the original InputStream?
Create a class that extends from FilterInputStream and override the method read in which you convert the original value to a new value. Following example introduces the ChangeCaseInputStream 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!
|
|
|
|
|