Normalize method comments.
This commit is contained in:
parent
8ddcf131bc
commit
cfbe396c23
1 changed files with 37 additions and 9 deletions
|
@ -43,7 +43,7 @@ public class XMLWriter
|
|||
protected PrintWriter out;
|
||||
|
||||
/**
|
||||
*
|
||||
* Default constructor (useful for extend this class).
|
||||
*/
|
||||
protected XMLWriter()
|
||||
{
|
||||
|
@ -51,8 +51,11 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialize a XML Writer to a file.
|
||||
*
|
||||
* @param file
|
||||
* Where write the XML data.
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
|
@ -62,8 +65,11 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialize a XML Writer to a <code>OutputStream</code>.
|
||||
*
|
||||
* @param target
|
||||
* Where write the XML data.
|
||||
*
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
public XMLWriter(final OutputStream target) throws UnsupportedEncodingException
|
||||
|
@ -72,8 +78,11 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* Initialize a XML Writer to a <code>Writer</code>.
|
||||
*
|
||||
* @param target
|
||||
* Where write the XML data.
|
||||
*
|
||||
* @throws UnsupportedEncodingException
|
||||
*/
|
||||
public XMLWriter(final Writer target) throws UnsupportedEncodingException
|
||||
|
@ -82,7 +91,7 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method closes the target stream.
|
||||
*/
|
||||
public void close() throws IOException
|
||||
{
|
||||
|
@ -94,7 +103,7 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method flushes the target stream.
|
||||
*/
|
||||
public void flush() throws IOException
|
||||
{
|
||||
|
@ -105,8 +114,10 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* This method writes a XML comment.
|
||||
*
|
||||
* @param comment
|
||||
* The comment to write.
|
||||
*/
|
||||
public void writeComment(final String comment)
|
||||
{
|
||||
|
@ -119,7 +130,7 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method writes a XML tag with no content.
|
||||
*/
|
||||
public void writeEmptyTag(final String label, final String... attributes)
|
||||
{
|
||||
|
@ -130,7 +141,7 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method writes a XML ender tag.
|
||||
*/
|
||||
public void writeEndTag(final String label)
|
||||
{
|
||||
|
@ -140,7 +151,7 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method writes a XML start tag.
|
||||
*/
|
||||
public void writeStartTag(final String label, final String... attributes)
|
||||
{
|
||||
|
@ -151,33 +162,43 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* This method write a XML tag with attributes and boolean content data.
|
||||
*
|
||||
* @param label
|
||||
* @param content
|
||||
* @param attributes
|
||||
*/
|
||||
public void writeTag(final String label, final boolean content, final String... attributes)
|
||||
{
|
||||
|
||||
writeStartTag(label, attributes);
|
||||
writeTagContent(String.valueOf(content));
|
||||
writeEndTag(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method write a XML tag with attributes and long content data.
|
||||
*
|
||||
* @param label
|
||||
* @param content
|
||||
* @param attributes
|
||||
*/
|
||||
public void writeTag(final String label, final long content, final String... attributes)
|
||||
{
|
||||
|
||||
writeStartTag(label, attributes);
|
||||
writeTagContent(String.valueOf(content));
|
||||
writeEndTag(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method write a XML tag with attributes and content data. Content
|
||||
* data are converted in XML format.
|
||||
*
|
||||
* @param label
|
||||
* @param content
|
||||
* @param attributes
|
||||
*/
|
||||
public void writeTag(final String label, final String content, final String... attributes)
|
||||
{
|
||||
|
||||
if (content == null)
|
||||
{
|
||||
writeEmptyTag(label, attributes);
|
||||
|
@ -191,7 +212,9 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* This method writes attributes of a tag.
|
||||
*
|
||||
* @param attributes
|
||||
*/
|
||||
private void writeTagAttributes(final String... attributes)
|
||||
{
|
||||
|
@ -210,7 +233,10 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* This method writes content using XML escape.
|
||||
*
|
||||
* @param content
|
||||
* data to write in XML format.
|
||||
*/
|
||||
private void writeTagContent(final String content)
|
||||
{
|
||||
|
@ -244,7 +270,9 @@ public class XMLWriter
|
|||
}
|
||||
|
||||
/**
|
||||
* This method writes a XML header with attributes.
|
||||
*
|
||||
* @param attributes
|
||||
*/
|
||||
public void writeXMLHeader(final String... attributes)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue