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 TypeMethodDescriptionvoidclose()Complete the writing of characters to the result.voidflush()Flush the contents of any buffers.voidProcess a supplied stringvoidwrite(UnicodeString chars) Process a supplied stringvoidwriteAscii(byte[] content) Write a supplied string known to consist entirely of ASCII characters, supplied as a byte arrayvoidwriteCodePoint(int codepoint) Process a single character.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sf.saxon.str.UnicodeWriter
writeRepeatedAscii
-
Constructor Details
-
UnicodeWriterToWriter
-
-
Method Details
-
write
Process a supplied string- Specified by:
writein 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:
writeCodePointin 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:
writein 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:
writeAsciiin 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:
closein interfaceUnicodeWriter- Throws:
IOException- if processing fails for any reason
-
flush
Flush the contents of any buffers.- Specified by:
flushin interfaceUnicodeWriter- Throws:
IOException- if processing fails for any reason
-