|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.Writer
java.io.PrintWriter
leon.misc.LyPrintWriter
leon.misc.LyXmlPrintWriter
public class LyXmlPrintWriter
LyXmlPrintWriter contains utility methods to write XML files.
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
Constructor Summary | |
---|---|
LyXmlPrintWriter(java.io.FileOutputStream output)
Constructor. |
|
LyXmlPrintWriter(java.io.FileOutputStream output,
java.lang.String charset)
Constructor. |
Method Summary | |
---|---|
void |
addIndent(boolean closeTag)
Sets the _closeTag parameter with the given value and calls. |
static boolean |
checkFile(java.lang.String filename,
java.lang.String destination)
Checks if the given filename with the xml extension at the given destination exits. |
void |
close()
Close the writer. |
static LyXmlPrintWriter |
getPrintWriter(java.lang.String filename,
java.lang.String destination)
Gets the print writer. |
static LyXmlPrintWriter |
getPrintWriter(java.lang.String filename,
java.lang.String destination,
java.lang.String type)
Gets the print writer associated to the given filename with the given extension at the given destination. |
void |
print(java.lang.String str)
Utility methods to print, avoid ^M at the end of lines and to indent result. |
boolean |
removeIndent(boolean closeTag)
Removes an indentation and if the given value is true and if _closeTag is true,
prints '/>'n sets _closeTag to false and return true, else return false. |
Methods inherited from class leon.misc.LyPrintWriter |
---|
addIndent, checkFile, getFilePath, getIndentString, getLinesCount, println, println, printnl, removeIndent, wasChanged |
Methods inherited from class java.io.PrintWriter |
---|
append, append, append, checkError, flush, format, format, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String __VERSION
Constructor Detail |
---|
public LyXmlPrintWriter(java.io.FileOutputStream output, java.lang.String charset) throws java.io.UnsupportedEncodingException
_closeTag
and LyPrintWriter._changed
to false, then starts
the print.
output
- the output stream where the XML has to be wrotecharset
- the name of a supported charset
java.io.UnsupportedEncodingException
- if the named encoding is not supportedpublic LyXmlPrintWriter(java.io.FileOutputStream output)
_closeTag
and LyPrintWriter._changed
to
false, then starts
the print.
output
- the file where the XML will be wroteMethod Detail |
---|
public void close()
close
in interface java.io.Closeable
close
in class java.io.PrintWriter
public static final boolean checkFile(java.lang.String filename, java.lang.String destination)
filename
- the name of the file where the XML will be wrotedestination
- the path of the file
public static final LyXmlPrintWriter getPrintWriter(java.lang.String filename, java.lang.String destination)
getPrintWriter(filename, destination, ".xml")
filename
- the name of the file where the XML will be wrotedestination
- the path of the file
getPrintWriter(String, String, String)
public static LyXmlPrintWriter getPrintWriter(java.lang.String filename, java.lang.String destination, java.lang.String type)
filename
- the name of the file where the XML will be wrotedestination
- the path of the filetype
- the file type (mostly ".xml")
public void print(java.lang.String str)
_closeTag
is set to true
then print '>' character and set the
attribute to false
.LyPrintWriter._indentNext
is set to true, print the number of tabulation of the LyPrintWriter._indent
parameter.LyPrintWriter._changed
to true
.
print
in class LyPrintWriter
public void addIndent(boolean closeTag)
_closeTag
parameter with the given value and calls. LyPrintWriter.addIndent()
closeTag
- the new close tag valuepublic boolean removeIndent(boolean closeTag)
_closeTag
is true,
prints '/>'n sets _closeTag to false and return true, else return false.
closeTag
- indicates if the end of tag must be print
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |