All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.jclark.xml.output.UTF8XMLWriter

java.lang.Object
   |
   +----java.io.Writer
           |
           +----com.jclark.xml.output.XMLWriter
                   |
                   +----com.jclark.xml.output.UTF8XMLWriter

public class UTF8XMLWriter
extends XMLWriter
An XMLWriter that encodes characters in UTF-8. Methods are not synchronized: wrap this in a SyncXMLWriter if you need to use this concurrently from multiple threads.


Variable Index

 o MINIMIZE_EMPTY_ELEMENTS

Constructor Index

 o UTF8XMLWriter(OutputStream)
Create an XML writer that will write in UTF-8 to the specified OutputStream with the default options.
 o UTF8XMLWriter(OutputStream, int)
Create an XML writer that will write in UTF-8 to the specified OutputStream with the specified options.

Method Index

 o attribute(String, String)
Write an attribute.
 o close()
 o endElement(String)
End an element.
 o flush()
 o markup(String)
Write markup.
 o processingInstruction(String, String)
Write a processing instruction.
 o startElement(String)
Start an element.
 o write(char)
 o write(char[], int, int)
 o write(String)
 o write(String, int, int)
 o writeUTF8(byte[], int, int)

Variables

 o MINIMIZE_EMPTY_ELEMENTS
 public static final int MINIMIZE_EMPTY_ELEMENTS

Constructors

 o UTF8XMLWriter
 public UTF8XMLWriter(OutputStream out,
                      int options)
Create an XML writer that will write in UTF-8 to the specified OutputStream with the specified options.

 o UTF8XMLWriter
 public UTF8XMLWriter(OutputStream out)
Create an XML writer that will write in UTF-8 to the specified OutputStream with the default options.

Methods

 o writeUTF8
 public void writeUTF8(byte buf[],
                       int off,
                       int len) throws IOException
 o write
 public void write(char cbuf[],
                   int off,
                   int len) throws IOException
Overrides:
write in class Writer
 o write
 public void write(char c) throws IOException
 o write
 public void write(String str) throws IOException
Overrides:
write in class Writer
 o write
 public void write(String str,
                   int off,
                   int len) throws IOException
Overrides:
write in class Writer
 o startElement
 public void startElement(String name) throws IOException
Start an element.

Overrides:
startElement in class XMLWriter
 o attribute
 public void attribute(String name,
                       String value) throws IOException
Write an attribute.

Overrides:
attribute in class XMLWriter
 o endElement
 public void endElement(String name) throws IOException
End an element.

Overrides:
endElement in class XMLWriter
 o processingInstruction
 public void processingInstruction(String target,
                                   String data) throws IOException
Write a processing instruction.

Overrides:
processingInstruction in class XMLWriter
 o markup
 public void markup(String str) throws IOException
Write markup.

Overrides:
markup in class XMLWriter
 o flush
 public void flush() throws IOException
Overrides:
flush in class Writer
 o close
 public void close() throws IOException
Overrides:
close in class Writer

All Packages  Class Hierarchy  This Package  Previous  Next  Index