Package net.sf.saxon.str
Class UnicodeWriterToWriter
java.lang.Object
net.sf.saxon.str.UnicodeWriterToWriter
- All Implemented Interfaces:
UnicodeWriter
Implementation of
UnicodeWriter
that converts Unicode strings to ordinary
Java strings and sends them to a supplied Writer-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Complete the writing of characters to the result.void
flush()
Flush the contents of any buffers.void
Process a supplied stringvoid
write
(UnicodeString chars) Process a supplied stringvoid
writeAscii
(byte[] content) Write a supplied string known to consist entirely of ASCII characters, supplied as a byte arrayvoid
writeCodePoint
(int codepoint) Process a single character.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.sf.saxon.str.UnicodeWriter
writeRepeatedAscii
-
Constructor Details
-
UnicodeWriterToWriter
-
-
Method Details
-
write
Process a supplied string- Specified by:
write
in interfaceUnicodeWriter
- Parameters:
chars
- the characters to be processed- Throws:
IOException
- if processing fails for any reason
-
writeCodePoint
Process a single character. Default implementation wraps the codepoint into a single-characterUnicodeString
- Specified by:
writeCodePoint
in interfaceUnicodeWriter
- Parameters:
codepoint
- the character to be processed. Must not be a surrogate- Throws:
IOException
- if processing fails for any reason
-
write
Process a supplied string- Specified by:
write
in interfaceUnicodeWriter
- Parameters:
chars
- the characters to be processed- Throws:
IOException
- if processing fails for any reason
-
writeAscii
Write a supplied string known to consist entirely of ASCII characters, supplied as a byte array- Specified by:
writeAscii
in interfaceUnicodeWriter
- Parameters:
content
- byte array holding ASCII characters only- Throws:
IOException
- if processing fails for any reason
-
close
Complete the writing of characters to the result.- Specified by:
close
in interfaceUnicodeWriter
- Throws:
IOException
- if processing fails for any reason
-
flush
Flush the contents of any buffers.- Specified by:
flush
in interfaceUnicodeWriter
- Throws:
IOException
- if processing fails for any reason
-