org.clapper.util.io
Class XMLWriter
- java.lang.Object
-
- java.io.Writer
-
- org.clapper.util.io.XMLWriter
-
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable
public class XMLWriter extends java.io.WriterXMLWriter is a filtering Writer class, designed to be used to write XML output. Basically, it performs some simple-minded indentation, to make the written XML a little more readable.- See Also:
Writer
-
-
Constructor Summary
Constructors Constructor and Description XMLWriter(java.io.PrintWriter out)Construct a new XMLWriter that will write its output to the specified PrintWriter object.XMLWriter(java.io.Writer out)Construct a new XMLWriter that will write its output to the specified Writer object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclose()Close this Writervoidflush()Flush this Writervoidwrite(char[] ch, int off, int len)Write a portion of an array of characters.
-
-
-
Constructor Detail
-
XMLWriter
public XMLWriter(java.io.Writer out)
Construct a new XMLWriter that will write its output to the specified Writer object.- Parameters:
out- where the output should really go
-
XMLWriter
public XMLWriter(java.io.PrintWriter out)
Construct a new XMLWriter that will write its output to the specified PrintWriter object.- Parameters:
out- where the output should really go
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionClose this Writer- Specified by:
closein interfacejava.io.Closeable- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein classjava.io.Writer- Throws:
java.io.IOException- I/O error
-
flush
public void flush() throws java.io.IOExceptionFlush this Writer- Specified by:
flushin interfacejava.io.Flushable- Specified by:
flushin classjava.io.Writer- Throws:
java.io.IOException- I/O error
-
write
public void write(char[] ch, int off, int len) throws java.io.IOExceptionWrite a portion of an array of characters.- Specified by:
writein classjava.io.Writer- Parameters:
ch- array of charactersoff- offset from which to start writing characterslen- number of characters to write- Throws:
java.io.IOException- I/O error
-
-
DMelt 3.0 © DataMelt by jWork.ORG