Package de.intarsys.tools.reader
Class UnEscapeReader
java.lang.Object
java.io.Reader
java.io.FilterReader
de.intarsys.tools.reader.UnEscapeReader
- All Implemented Interfaces:
IUnEscaper,Closeable,AutoCloseable,Readable
A reader that can unescape character data from a wrapped reader.
-
Field Summary
FieldsFields inherited from class java.io.FilterReader
in -
Constructor Summary
ConstructorsConstructorDescriptionUnEscapeReader(Reader in) UnEscapeReader(Reader in, char escape, Map map) UnEscapeReader(Reader in, Map map) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEscapedCharacter(char key, char value) voidclose()charcharbooleanisMapped()intread()intread(char[] cbuf, int off, int len) protected intprotected intreadHex()voidremoveEscapedCharacter(char key) voidvoidsetEscape(char newEscape) protected voidsetEscapeMap(Map newEscapeMap) voidsetUnicodePrefix(char newUniChar) longskip(long n) static StringMethods inherited from class java.io.FilterReader
mark, markSupported, ready, resetMethods inherited from class java.io.Reader
nullReader, read, read, transferTo
-
Field Details
-
DefaultEscape
public static final char DefaultEscape- See Also:
-
-
Constructor Details
-
UnEscapeReader
-
UnEscapeReader
-
UnEscapeReader
-
-
Method Details
-
unescape
- Throws:
IOException
-
addEscapedCharacter
public void addEscapedCharacter(char key, char value) - Specified by:
addEscapedCharacterin interfaceIUnEscaper
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classFilterReader- Throws:
IOException
-
getEscape
public char getEscape() -
getEscapeMap
-
getUnicodePrefix
public char getUnicodePrefix() -
isMapped
public boolean isMapped()- Specified by:
isMappedin interfaceIUnEscaper
-
read
- Overrides:
readin classFilterReader- Throws:
IOException
-
read
- Overrides:
readin classFilterReader- Throws:
IOException
-
readEscaped
- Throws:
IOException
-
readHex
- Throws:
IOException
-
removeEscapedCharacter
public void removeEscapedCharacter(char key) -
removeEscapedCharacters
public void removeEscapedCharacters() -
setEscape
public void setEscape(char newEscape) - Specified by:
setEscapein interfaceIUnEscaper
-
setEscapeMap
-
setUnicodePrefix
public void setUnicodePrefix(char newUniChar) -
skip
- Overrides:
skipin classFilterReader- Throws:
IOException
-