Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.parser.v2
Class XMLOutputStream

    java.lang.Object
      |
      +--oracle.xml.parser.v2.XMLOutputStream

public class XMLOutputStream
extends java.lang.Object

XMLOutputSteam -- writes output stream, can handle XML encoding

Field Summary
`static int` | `COMPACT`
`static int` | `DEFAULT`
`static int` | `PRETTY`

Constructor Summary
`XMLOutputStream(java.io.OutputStream out)` Builds the ASCII output stream
`XMLOutputStream(java.io.PrintWriter out)` Builds the output stream from PrintWriter
`XMLOutputStream(java.io.Writer out)` Builds the output stream from PrintWriter

Method Summary
`void` | `addIndent(int offset)` Set indenting level for output
`void` | `close()` Closes the output stream
`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
`void` | `setEOLChars(java.lang.String nl)` Set Newline charachters
`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

### DEFAULT

    public static int DEFAULT

### PRETTY

    public static int PRETTY

### COMPACT

    public static int COMPACT

Constructor Detail

### XMLOutputStream

    public XMLOutputStream(java.io.OutputStream out)

  Builds the ASCII output stream
Parameters:
  `out` - the output stream

### XMLOutputStream

    public XMLOutputStream(java.io.Writer out)

  Builds the output stream from PrintWriter
Parameters:
  `out` - the PrintWriter stream

### XMLOutputStream

    public XMLOutputStream(java.io.PrintWriter out)

  Builds the output stream from PrintWriter
Parameters:
  `out` - the PrintWriter stream

Method Detail

### setEOLChars

    public void setEOLChars(java.lang.String nl)

  Set Newline charachters

### setEncoding

    public void setEncoding(java.lang.String encoding,
                            boolean lendian,
                            boolean byteOrderMark)
                     throws java.io.IOException

  Sets the output character encoding
  Parameters:
    `encoding` - the encoding of the stream
    `lendian` - flag to indicate if the encoding is of type little endian
    `byteOrderMark` - flag to indicate if byte order mark is set
  Throws:
    `java.io.IOException` - if error is thrown in setting the encoding type

### flush

    public void flush()
               throws java.io.IOException

  Flushes the output stream
  Throws:
    `java.io.IOException` - if there is any error in flushing the output stream

### close

    public void close()
               throws java.io.IOException

  Closes the output stream
  Throws:
    `java.io.IOException` - if there is any error in closing the output stream

### write

    public void write(int c)
               throws java.io.IOException

  Outputs character according to type of the output stream
  Parameters:
    `c` - the character that needs to be written
  Throws:
    `java.io.IOException` - if there is any error in writing the character

### writeChars

    public void writeChars(java.lang.String str)
                    throws java.io.IOException

  Write string to the output
  Parameters:
    `str` - the string that is written to the output stream
  Throws:
    `java.io.IOException` - error thrown if there is any error in writing the string

### writeQuotedString

    public void writeQuotedString(java.lang.String str)
                           throws java.io.IOException

  Write string with surrounding quotes
  Parameters:
    `str` - the string that is written to the output stream
  Throws:
    `java.io.IOException` - error thrown if there is any error in writing the string

### writeNewLine

    public void writeNewLine()
                      throws java.io.IOException

  Newline writer
  Throws:
    `java.io.IOException` - error thrown if there is any error in writing the string

### addIndent

    public void addIndent(int offset)

  Set indenting level for output
  Parameters:
    `offset` - the indenting level

### writeIndent

    public void writeIndent()
                     throws java.io.IOException

  Output the indentation
  Throws:
    `java.io.IOException` - error thrown if there is any error in writing the string

### setOutputStyle

    public void setOutputStyle(int style)

  Sets the Output the style
  Parameters:
    `style` - the output style

### getOutputStyle

    public int getOutputStyle()

  Gets the Current output style
  Returns:
    the output style

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.