Package com.storedobject.common
Class TranslatedReader
java.lang.Object
java.io.Reader
java.io.FilterReader
com.storedobject.common.TranslatedReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Readable
- Direct Known Subclasses:
StringFillerReader
A
FilterReader
that translates its stream on-the-fly.- Author:
- Syam
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new translated reader. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Translation should be done here.Methods inherited from class java.io.FilterReader
close, mark, markSupported, read, read, ready, reset, skip
Methods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Field Details
-
in
-
out
-
-
Constructor Details
-
TranslatedReader
Creates a new translated reader.- Parameters:
in
- Reader object providing the underlying stream.
-
-
Method Details
-
translate
Translation should be done here. Original reader is available in the variablein
and the translated output should be written to theBufferedWriter
(variableout
).- Throws:
Exception
- Throws any exception so that the ultimate reading program will get it.
-