From cfbe396c23b226de477006c418180b3685f32713 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sun, 8 Jun 2014 19:40:58 +0200 Subject: [PATCH] Normalize method comments. --- src/fr/devinsy/util/xml/XMLWriter.java | 46 +++++++++++++++++++++----- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/src/fr/devinsy/util/xml/XMLWriter.java b/src/fr/devinsy/util/xml/XMLWriter.java index 550d72a..d64016e 100644 --- a/src/fr/devinsy/util/xml/XMLWriter.java +++ b/src/fr/devinsy/util/xml/XMLWriter.java @@ -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 OutputStream. * * @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 Writer. * * @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) {