Package com.biglybt.core.xml.util
Class XUXmlWriter
- java.lang.Object
-
- com.biglybt.core.xml.util.XUXmlWriter
-
- Direct Known Subclasses:
BEncoder.XMLEncoder
,StatsWriterImpl
,TOTorrentXMLSerialiser
public class XUXmlWriter extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
current_indent_string
private boolean
generic_simple
private static int
INDENT_AMOUNT
private java.io.PrintWriter
writer
-
Constructor Summary
Constructors Modifier Constructor Description protected
XUXmlWriter()
protected
XUXmlWriter(java.io.OutputStream _output_stream)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeOutputStream()
protected java.lang.String
encodeBytes(byte[] bytes)
static java.lang.String
escapeXML(java.lang.String str)
protected void
exdent()
protected void
flushOutputStream()
protected void
indent()
protected void
resetIndent()
protected void
setGenericSimple(boolean simple)
protected void
setOutputStream(java.io.OutputStream _output_stream)
protected void
setOutputWriter(java.io.Writer _writer)
static java.lang.String[]
splitWithEscape(java.lang.String str, char delim)
static java.lang.String
unescapeXML(java.lang.String str)
protected void
writeGeneric(byte[] bytes)
protected void
writeGeneric(java.lang.Long l)
protected void
writeGeneric(java.lang.Object obj)
protected void
writeGeneric(java.lang.String str)
protected void
writeGeneric(java.util.List list)
protected void
writeGeneric(java.util.Map map)
protected void
writeGenericMapEntry(java.lang.String name, java.lang.Object value)
protected void
writeLineEscaped(java.lang.String str)
protected void
writeLineRaw(java.lang.String str)
protected void
writeLocalisableTag(java.lang.String tag, byte[] content)
protected void
writeTag(java.lang.String tag, boolean content)
protected void
writeTag(java.lang.String tag, byte[] content)
protected void
writeTag(java.lang.String tag, long content)
protected void
writeTag(java.lang.String tag, java.lang.String content)
-
-
-
Field Detail
-
INDENT_AMOUNT
private static final int INDENT_AMOUNT
- See Also:
- Constant Field Values
-
current_indent_string
private java.lang.String current_indent_string
-
writer
private java.io.PrintWriter writer
-
generic_simple
private boolean generic_simple
-
-
Method Detail
-
setOutputStream
protected void setOutputStream(java.io.OutputStream _output_stream)
-
setOutputWriter
protected void setOutputWriter(java.io.Writer _writer)
-
setGenericSimple
protected void setGenericSimple(boolean simple)
-
writeTag
protected void writeTag(java.lang.String tag, java.lang.String content)
-
writeTag
protected void writeTag(java.lang.String tag, long content)
-
writeTag
protected void writeTag(java.lang.String tag, boolean content)
-
writeLineRaw
protected void writeLineRaw(java.lang.String str)
-
writeLineEscaped
protected void writeLineEscaped(java.lang.String str)
-
resetIndent
protected void resetIndent()
-
indent
protected void indent()
-
exdent
protected void exdent()
-
escapeXML
public static java.lang.String escapeXML(java.lang.String str)
-
unescapeXML
public static java.lang.String unescapeXML(java.lang.String str)
-
splitWithEscape
public static java.lang.String[] splitWithEscape(java.lang.String str, char delim)
-
flushOutputStream
protected void flushOutputStream()
-
closeOutputStream
protected void closeOutputStream()
-
writeGenericMapEntry
protected void writeGenericMapEntry(java.lang.String name, java.lang.Object value)
-
writeGeneric
protected void writeGeneric(java.lang.Object obj)
-
writeGeneric
protected void writeGeneric(java.util.Map map)
-
writeGeneric
protected void writeGeneric(java.util.List list)
-
writeGeneric
protected void writeGeneric(byte[] bytes)
-
writeGeneric
protected void writeGeneric(java.lang.String str)
-
writeGeneric
protected void writeGeneric(java.lang.Long l)
-
writeTag
protected void writeTag(java.lang.String tag, byte[] content)
-
writeLocalisableTag
protected void writeLocalisableTag(java.lang.String tag, byte[] content)
-
encodeBytes
protected java.lang.String encodeBytes(byte[] bytes)
-
-