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 intCLOSINGClosing tag.static intNO_CONTENTElement with no content.static intOPENINGOpening tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsendData()Send data and reinitializes buffer.StringtoString()Retrieve generated XML.voidwriteData(String data)Write data.voidwriteElement(String name, int type)Write an element.voidwriteProperty(String name)Write property to the XML.voidwriteProperty(String name, String value)Write property to the XML.voidwriteText(String text)Write text.voidwriteXMLHeader()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 IOExceptionSend data and reinitializes buffer.- Throws:
IOException
-
-