com.ctc.wstx.io
Class WriterBase
java.lang.Object
java.io.Writer
java.io.FilterWriter
com.ctc.wstx.io.WriterBase
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable
- Direct Known Subclasses:
- SingleByteAttrValueWriter, SingleByteTextWriter, UTFAttrValueWriter, UTFTextWriter
public class WriterBase
- extends java.io.FilterWriter
Common base class for escaping Writer implementations; contains
commonly used constants, as well as some convenience utility
methods.
Note: the class is only public for testing purposes.
Field Summary |
protected static char |
CHAR_NULL
|
protected static char |
CHAR_SPACE
|
protected static char |
HIGHEST_ENCODABLE_ATTR_CHAR
Highest valued character that may need to be encoded (minus charset
encoding requirements) when writing attribute values. |
protected static char |
HIGHEST_ENCODABLE_TEXT_CHAR
Highest valued character that may need to be encoded (minus charset
encoding requirements) when writing attribute values. |
protected char[] |
mEntityBuffer
Temporary char buffer used to assemble character entities. |
protected static java.lang.String |
STR_ESCAPED_CR
Character entity for representing \r character; used if this
character is to be round-trippable (receiving app needs to be
able to distinguish it from other linefeeds) |
Fields inherited from class java.io.FilterWriter |
out |
Fields inherited from class java.io.Writer |
lock |
Constructor Summary |
protected |
WriterBase(java.io.Writer out)
|
Methods inherited from class java.io.FilterWriter |
close, flush, write, write, write |
Methods inherited from class java.io.Writer |
append, append, append, write, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HIGHEST_ENCODABLE_ATTR_CHAR
protected static final char HIGHEST_ENCODABLE_ATTR_CHAR
- Highest valued character that may need to be encoded (minus charset
encoding requirements) when writing attribute values.
- See Also:
- Constant Field Values
HIGHEST_ENCODABLE_TEXT_CHAR
protected static final char HIGHEST_ENCODABLE_TEXT_CHAR
- Highest valued character that may need to be encoded (minus charset
encoding requirements) when writing attribute values.
- See Also:
- Constant Field Values
CHAR_NULL
protected static final char CHAR_NULL
- See Also:
- Constant Field Values
CHAR_SPACE
protected static final char CHAR_SPACE
- See Also:
- Constant Field Values
STR_ESCAPED_CR
protected static final java.lang.String STR_ESCAPED_CR
- Character entity for representing \r character; used if this
character is to be round-trippable (receiving app needs to be
able to distinguish it from other linefeeds)
- See Also:
- Constant Field Values
mEntityBuffer
protected char[] mEntityBuffer
- Temporary char buffer used to assemble character entities. Big
enough to contain full hex-encoded 16-bit char entities (like
'ሴ')
WriterBase
protected WriterBase(java.io.Writer out)
getQuoteEntity
protected static final java.lang.String getQuoteEntity(char qchar)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
throwNullChar
protected void throwNullChar()
throws java.io.IOException
- Throws:
java.io.IOException
writeAsEntity
protected final void writeAsEntity(int c)
throws java.io.IOException
- Throws:
java.io.IOException