com.tagtraum.sixbs
Class SIXBSWriter

java.lang.Object
  |
  +--com.tagtraum.sixbs.SIXBSWriter

public class SIXBSWriter
extends Object

Serializes beans to XML.

Version:
$Id: SIXBSWriter.java,v 1.5 2001/08/06 16:46:42 Hendrik Exp $
Author:
Hendrik Schreiber
See Also:
SIXBSReader

Field Summary
static String vcid
          Source-Version
 
Constructor Summary
SIXBSWriter(OutputStream out, boolean append)
          Uses default char encoding.
SIXBSWriter(OutputStream out, boolean append, String encoding)
          For performance reasons the OutputStream should be buffered. sixbs does not buffer.
SIXBSWriter(OutputStreamWriter out, AdapterFinder adapterFinder, boolean append)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.
SIXBSWriter(Writer out)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided buffer.
SIXBSWriter(Writer out, AdapterFinder adapterFinder, boolean append)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.
SIXBSWriter(Writer out, AdapterFinder adapterFinder, boolean append, String encoding)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.
SIXBSWriter(Writer out, AdapterFinder adapterFinder, boolean append, String encoding, String version)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.
SIXBSWriter(Writer out, boolean append)
          For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.
 
Method Summary
 void close()
          Close the stream, flushing it first.
 void flush()
          Flush the stream.
 void writeObject(Object obj)
          Writes an object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vcid

public static String vcid
Source-Version

Constructor Detail

SIXBSWriter

public SIXBSWriter(OutputStream out,
                   boolean append)
            throws IOException
Uses default char encoding. The default AdapterFinder is used.

Parameters:
out - OutputStream to write objects to with the system's default encoding.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.

SIXBSWriter

public SIXBSWriter(OutputStream out,
                   boolean append,
                   String encoding)
            throws IOException
For performance reasons the OutputStream should be buffered. sixbs does not buffer. The default AdapterFinder is used.

Parameters:
out - OutputStream to write objects to with the system's default encoding.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.
encoding - char set to be used

SIXBSWriter

public SIXBSWriter(Writer out)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided buffer. No XML declaration is written. The default AdapterFinder is used. Append is set to false.

Parameters:
out - Writer to write objects to.

SIXBSWriter

public SIXBSWriter(Writer out,
                   boolean append)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.

Parameters:
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.
out - Writer to write objects to.

SIXBSWriter

public SIXBSWriter(Writer out,
                   AdapterFinder adapterFinder,
                   boolean append)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.

Parameters:
out - Writer to write objects to.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.

SIXBSWriter

public SIXBSWriter(OutputStreamWriter out,
                   AdapterFinder adapterFinder,
                   boolean append)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.

Parameters:
out - Writer to write objects to with the specified encoding.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.
adapterFinder - the adapterFinder to use

SIXBSWriter

public SIXBSWriter(Writer out,
                   AdapterFinder adapterFinder,
                   boolean append,
                   String encoding)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.

Parameters:
out - Writer to write objects to with the specified encoding.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.
adapterFinder - the adapterFinder to use
encoding - encoding that is used by the writer - set null, if unknwon

SIXBSWriter

public SIXBSWriter(Writer out,
                   AdapterFinder adapterFinder,
                   boolean append,
                   String encoding,
                   String version)
            throws IOException
For performance reasons the Writer should be buffered. sixbs does not buffer. sixbs will write with the systems default encoding or the encoding set in the provided writer.

Parameters:
out - Writer to write objects to with the specified encoding.
append - if true, neither the XML declaration (<?xml version="1.0"?>) nor the sixbs tags are written.
adapterFinder - the adapterFinder to use
encoding - encoding that is used by the writer - set null, if unknwon
version - version of the writerimpl that is to be instantiated
Method Detail

writeObject

public void writeObject(Object obj)
                 throws IOException
Writes an object.

IOException

flush

public void flush()
           throws IOException
Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.

Throws:
IOException - If an I/O error occurs

close

public void close()
           throws IOException
Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. If this writer does not operate in append-mode, a closing </sixbs> tag will be written.

Throws:
IOException - If an I/O error occurs


Copyright © 2001 tagtraum industries.