|
Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLOutputStream
public class XMLOutputStream
XMLOutputSteam -- writes output stream, can handle XML encoding
Field Summary | |
---|---|
static int |
COMPACT |
static int |
DEFAULT |
static int |
NO_REUSE |
static int |
PRETTY |
static int |
REUSE |
Constructor Summary | |
---|---|
XMLOutputStream(java.io.OutputStream outs) Builds the ASCII output stream (as a byte stream) |
|
XMLOutputStream(java.io.Writer outw) Builds the output stream from a Writer (also PrintWriter) (as a character stream) |
Method Summary | |
---|---|
void |
addIndent(int offset) Set indenting level for output |
void |
close() Closes the output stream. |
void |
close(int option) Closes the output stream based on the option. |
void |
flush() Flushes the output stream |
int |
getOutputStyle() Gets the Current output style |
void |
setEncoding(java.lang.String encoding, boolean lendian, boolean byteOrderMark) Sets the output character encoding for a byte stream. |
void |
setEOLChars(java.lang.String nl) Set newline characters |
void |
setOutputStyle(int style) Sets the Output the style |
void |
write(int c) Outputs character according to type of the output stream |
void |
writeChars(java.lang.String str) Write string to the output |
void |
writeIndent() Output the indentation |
void |
writeNewLine() Newline writer |
void |
writeQuotedString(java.lang.String str) Write string with surrounding quotes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT
public static final int PRETTY
public static final int COMPACT
public static final int REUSE
public static final int NO_REUSE
Constructor Detail |
---|
public XMLOutputStream(java.io.OutputStream outs)
out
- the output streampublic XMLOutputStream(java.io.Writer outw)
out
- the Writer streamMethod Detail |
---|
public void setEOLChars(java.lang.String nl)
public void setEncoding(java.lang.String encoding, boolean lendian, boolean byteOrderMark) throws java.io.IOException
encoding
- the encoding of the (byte) streamlendian
- flag to indicate if the encoding is of type little endianbyteOrderMark
- flag to indicate if byte order mark is setjava.io.IOException
- if error is thrown in setting the encoding typepublic void flush() throws java.io.IOException
java.io.IOException
- if there is any error in flushing the output streampublic void close() throws java.io.IOException
java.io.IOException
- if there is any error in closing the output streampublic void close(int option) throws java.io.IOException
option
- determines whether output stream has to be closed.java.io.IOException
- if there is any error in closing the output stream.public void write(int c) throws java.io.IOException
c
- the character that needs to be written. Note that c can be either a standard Unicode code point (i.e., using UTF-32 encoding); or it may be just one member of a surrogate pair, either a high surrogate or a low surrogate. I.e., for supplementary characters, which use surrogate pairs in UTF-16, we may have to call write() twice in order to write one logical character.java.io.IOException
- if there is any error in writing the characterpublic void writeChars(java.lang.String str) throws java.io.IOException
str
- the string that is written to the output streamjava.io.IOException
- error thrown if there is any error in writing the stringpublic void writeQuotedString(java.lang.String str) throws java.io.IOException
str
- the string that is written to the output streamjava.io.IOException
- error thrown if there is any error in writing the stringpublic void writeNewLine() throws java.io.IOException
java.io.IOException
- error thrown if there is any error in writing the stringpublic void addIndent(int offset)
offset
- the indenting levelpublic void writeIndent() throws java.io.IOException
java.io.IOException
- error thrown if there is any error in writing the stringpublic void setOutputStyle(int style)
style
- the output stylepublic int getOutputStyle()
|
Oracle® Database XML Java API Reference 11g Release 2 (11.2) E10769-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |