Package org.drjekyll.webdav
Class XMLWriter
- java.lang.Object
-
- org.drjekyll.webdav.XMLWriter
-
public class XMLWriter extends Object
XMLWriter helper class.- Author:
- Remy Maucherat
-
-
Field Summary
Fields Modifier and Type Field Description static int
CLOSING
Closing tag.static int
NO_CONTENT
Element with no content.static int
OPENING
Opening tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
sendData()
Send data and reinitializes buffer.String
toString()
Retrieve generated XML.void
writeData(String data)
Write data.void
writeElement(String name, int type)
Write an element.void
writeProperty(String name)
Write property to the XML.void
writeProperty(String name, String value)
Write property to the XML.void
writeText(String text)
Write text.void
writeXMLHeader()
Write XML Header.
-
-
-
Field Detail
-
OPENING
public static final int OPENING
Opening tag.- See Also:
- Constant Field Values
-
CLOSING
public static final int CLOSING
Closing tag.- See Also:
- Constant Field Values
-
NO_CONTENT
public static final int NO_CONTENT
Element with no content.- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
public String toString()
Retrieve generated XML.
-
writeProperty
public void writeProperty(String name, String value)
Write property to the XML.- Parameters:
name
- Property namevalue
- Property value
-
writeElement
public void writeElement(String name, int type)
Write an element.- Parameters:
name
- Element nametype
- Element type
-
writeProperty
public void writeProperty(String name)
Write property to the XML.- Parameters:
name
- Property name
-
writeText
public void writeText(String text)
Write text.- Parameters:
text
- Text to append
-
writeData
public void writeData(String data)
Write data.- Parameters:
data
- Data to append
-
writeXMLHeader
public void writeXMLHeader()
Write XML Header.
-
sendData
public void sendData() throws IOException
Send data and reinitializes buffer.- Throws:
IOException
-
-