Package net.sf.saxon.str
Class UnicodeWriterToWriter
- java.lang.Object
-
- net.sf.saxon.str.UnicodeWriterToWriter
-
- All Implemented Interfaces:
UnicodeWriter
public class UnicodeWriterToWriter extends java.lang.Object implements UnicodeWriter
Implementation ofUnicodeWriterthat converts Unicode strings to ordinary Java strings and sends them to a supplied Writer
-
-
Constructor Summary
Constructors Constructor Description UnicodeWriterToWriter(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Complete the writing of characters to the result.voidflush()Flush the contents of any buffers.voidwrite(java.lang.String chars)Process 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, wait
-
Methods inherited from interface net.sf.saxon.str.UnicodeWriter
writeRepeatedAscii
-
-
-
-
Method Detail
-
write
public void write(UnicodeString chars) throws java.io.IOException
Process a supplied string- Specified by:
writein interfaceUnicodeWriter- Parameters:
chars- the characters to be processed- Throws:
java.io.IOException- if processing fails for any reason
-
writeCodePoint
public void writeCodePoint(int codepoint) throws java.io.IOExceptionProcess 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:
java.io.IOException- if processing fails for any reason
-
write
public void write(java.lang.String chars) throws java.io.IOExceptionProcess a supplied string- Specified by:
writein interfaceUnicodeWriter- Parameters:
chars- the characters to be processed- Throws:
java.io.IOException- if processing fails for any reason
-
writeAscii
public void writeAscii(byte[] content) throws java.io.IOExceptionWrite 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:
java.io.IOException- if processing fails for any reason
-
close
public void close() throws java.io.IOExceptionComplete the writing of characters to the result.- Specified by:
closein interfaceUnicodeWriter- Throws:
java.io.IOException- if processing fails for any reason
-
flush
public void flush() throws java.io.IOExceptionFlush the contents of any buffers.- Specified by:
flushin interfaceUnicodeWriter- Throws:
java.io.IOException- if processing fails for any reason
-
-