org.eclipse.mylyn.wikitext.core.util
Class DefaultXmlStreamWriter
java.lang.Object
org.eclipse.mylyn.wikitext.core.util.XmlStreamWriter
org.eclipse.mylyn.wikitext.core.util.DefaultXmlStreamWriter
public class DefaultXmlStreamWriter
- extends XmlStreamWriter
A default implementation of XmlStreamWriter
that creates XML character output.
- Since:
- 1.0
- Author:
- David Green
Method Summary |
void |
close()
|
protected PrintWriter |
createUtf8PrintWriter(OutputStream out)
|
void |
flush()
|
int |
getElementNestLevel()
|
protected static String |
getEntityRef(int ch,
boolean attribute)
|
String |
getPrefix(String uri)
|
Object |
getProperty(String name)
|
char |
getXmlHederQuoteChar()
|
protected static boolean |
isUtf8Printable(char ch)
|
void |
setDefaultNamespace(String uri)
|
void |
setPrefix(String prefix,
String uri)
|
void |
setXmlHederQuoteChar(char xmlHederQuoteChar)
|
void |
writeAttribute(String localName,
String value)
|
void |
writeAttribute(String namespaceURI,
String localName,
String value)
|
void |
writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeCData(String data)
|
void |
writeCharacters(char[] text,
int start,
int len)
|
void |
writeCharacters(String text)
|
void |
writeCharactersUnescaped(String text)
|
void |
writeComment(String data)
|
void |
writeDefaultNamespace(String namespaceURI)
|
void |
writeDTD(String dtd)
|
void |
writeEmptyElement(String localName)
|
void |
writeEmptyElement(String namespaceURI,
String localName)
|
void |
writeEmptyElement(String prefix,
String localName,
String namespaceURI)
|
void |
writeEndDocument()
|
void |
writeEndElement()
|
void |
writeEntityRef(String name)
|
void |
writeLiteral(String literal)
Write an XML fragment directly to the output. |
void |
writeNamespace(String prefix,
String namespaceURI)
|
void |
writeProcessingInstruction(String target)
|
void |
writeProcessingInstruction(String target,
String data)
|
void |
writeStartDocument()
|
void |
writeStartDocument(String version)
|
void |
writeStartDocument(String encoding,
String version)
|
void |
writeStartElement(String localName)
|
void |
writeStartElement(String namespaceURI,
String localName)
|
void |
writeStartElement(String prefix,
String localName,
String namespaceURI)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultXmlStreamWriter
public DefaultXmlStreamWriter(OutputStream out)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
DefaultXmlStreamWriter
public DefaultXmlStreamWriter(Writer out)
DefaultXmlStreamWriter
public DefaultXmlStreamWriter(Writer out,
char xmlHeaderQuoteChar)
createUtf8PrintWriter
protected PrintWriter createUtf8PrintWriter(OutputStream out)
throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
close
public void close()
- Specified by:
close
in class XmlStreamWriter
flush
public void flush()
- Specified by:
flush
in class XmlStreamWriter
getElementNestLevel
public int getElementNestLevel()
- Specified by:
getElementNestLevel
in class XmlStreamWriter
getPrefix
public String getPrefix(String uri)
- Specified by:
getPrefix
in class XmlStreamWriter
getProperty
public Object getProperty(String name)
throws IllegalArgumentException
- Throws:
IllegalArgumentException
setDefaultNamespace
public void setDefaultNamespace(String uri)
- Specified by:
setDefaultNamespace
in class XmlStreamWriter
setPrefix
public void setPrefix(String prefix,
String uri)
- Specified by:
setPrefix
in class XmlStreamWriter
writeAttribute
public void writeAttribute(String localName,
String value)
- Specified by:
writeAttribute
in class XmlStreamWriter
writeAttribute
public void writeAttribute(String namespaceURI,
String localName,
String value)
- Specified by:
writeAttribute
in class XmlStreamWriter
writeAttribute
public void writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
- Specified by:
writeAttribute
in class XmlStreamWriter
writeCData
public void writeCData(String data)
- Specified by:
writeCData
in class XmlStreamWriter
writeCharacters
public void writeCharacters(String text)
- Specified by:
writeCharacters
in class XmlStreamWriter
writeCharactersUnescaped
public void writeCharactersUnescaped(String text)
writeLiteral
public void writeLiteral(String literal)
- Description copied from class:
XmlStreamWriter
- Write an XML fragment directly to the output. The given text is not processed or XML-encoded, since it is assumed
to be a legal XML fragment.
- Specified by:
writeLiteral
in class XmlStreamWriter
writeCharacters
public void writeCharacters(char[] text,
int start,
int len)
- Specified by:
writeCharacters
in class XmlStreamWriter
writeComment
public void writeComment(String data)
- Specified by:
writeComment
in class XmlStreamWriter
writeDTD
public void writeDTD(String dtd)
- Specified by:
writeDTD
in class XmlStreamWriter
writeDefaultNamespace
public void writeDefaultNamespace(String namespaceURI)
- Specified by:
writeDefaultNamespace
in class XmlStreamWriter
writeEmptyElement
public void writeEmptyElement(String localName)
- Specified by:
writeEmptyElement
in class XmlStreamWriter
writeEmptyElement
public void writeEmptyElement(String namespaceURI,
String localName)
- Specified by:
writeEmptyElement
in class XmlStreamWriter
writeEmptyElement
public void writeEmptyElement(String prefix,
String localName,
String namespaceURI)
- Specified by:
writeEmptyElement
in class XmlStreamWriter
writeEndDocument
public void writeEndDocument()
- Specified by:
writeEndDocument
in class XmlStreamWriter
writeEndElement
public void writeEndElement()
- Specified by:
writeEndElement
in class XmlStreamWriter
writeEntityRef
public void writeEntityRef(String name)
- Specified by:
writeEntityRef
in class XmlStreamWriter
writeNamespace
public void writeNamespace(String prefix,
String namespaceURI)
- Specified by:
writeNamespace
in class XmlStreamWriter
writeProcessingInstruction
public void writeProcessingInstruction(String target)
- Specified by:
writeProcessingInstruction
in class XmlStreamWriter
writeProcessingInstruction
public void writeProcessingInstruction(String target,
String data)
- Specified by:
writeProcessingInstruction
in class XmlStreamWriter
writeStartDocument
public void writeStartDocument()
- Specified by:
writeStartDocument
in class XmlStreamWriter
writeStartDocument
public void writeStartDocument(String version)
- Specified by:
writeStartDocument
in class XmlStreamWriter
writeStartDocument
public void writeStartDocument(String encoding,
String version)
- Specified by:
writeStartDocument
in class XmlStreamWriter
writeStartElement
public void writeStartElement(String localName)
- Specified by:
writeStartElement
in class XmlStreamWriter
writeStartElement
public void writeStartElement(String namespaceURI,
String localName)
- Specified by:
writeStartElement
in class XmlStreamWriter
writeStartElement
public void writeStartElement(String prefix,
String localName,
String namespaceURI)
- Specified by:
writeStartElement
in class XmlStreamWriter
getXmlHederQuoteChar
public char getXmlHederQuoteChar()
setXmlHederQuoteChar
public void setXmlHederQuoteChar(char xmlHederQuoteChar)
getEntityRef
protected static String getEntityRef(int ch,
boolean attribute)
isUtf8Printable
protected static boolean isUtf8Printable(char ch)
Copyright © 2011 FuseSource, Corp.. All Rights Reserved.