org.dhmp.io
Class MapOutputStream

java.lang.Object
  extended byorg.dhmp.io.AbstractMapOutput
      extended byorg.dhmp.io.MapOutputStream
All Implemented Interfaces:
MapOutput

public class MapOutputStream
extends AbstractMapOutput

Write a HierarchicalMap to OutputStream.

Author:
hideyuki

Field Summary
 
Fields inherited from class org.dhmp.io.AbstractMapOutput
AUTOCOMMIT_OFF, AUTOCOMMIT_ON
 
Constructor Summary
MapOutputStream(java.io.OutputStream out)
          Creates a MapOutputStream and saves its argument, the output stream out, for later use.
 
Method Summary
protected  void elementReference(java.lang.String key, java.lang.Object value, java.lang.String reference, int index, boolean last)
           
protected  void elementValue(java.lang.Object key, java.lang.Object value, boolean last)
           
protected  void endDocument()
           
protected  void endElement(java.lang.String key, boolean last)
           
protected  void init()
           
protected  void startDocument()
           
protected  void startElement(java.lang.String key)
           
 
Methods inherited from class org.dhmp.io.AbstractMapOutput
close, closeElements, closeExclude, flush, flush, flushAll, init, init, replace, writeMap, writeMap, writeMap, writeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapOutputStream

public MapOutputStream(java.io.OutputStream out)
                throws MapIOException
Creates a MapOutputStream and saves its argument, the output stream out, for later use.

Parameters:
out - the underlying output stream.
Method Detail

init

protected void init()
             throws MapIOException
Throws:
MapIOException

startElement

protected void startElement(java.lang.String key)
                     throws java.io.IOException
Specified by:
startElement in class AbstractMapOutput
Throws:
java.io.IOException

endElement

protected void endElement(java.lang.String key,
                          boolean last)
                   throws java.io.IOException
Specified by:
endElement in class AbstractMapOutput
Throws:
java.io.IOException

elementValue

protected void elementValue(java.lang.Object key,
                            java.lang.Object value,
                            boolean last)
                     throws java.io.IOException
Specified by:
elementValue in class AbstractMapOutput
Throws:
java.io.IOException

elementReference

protected void elementReference(java.lang.String key,
                                java.lang.Object value,
                                java.lang.String reference,
                                int index,
                                boolean last)
                         throws java.io.IOException
Specified by:
elementReference in class AbstractMapOutput
Throws:
java.io.IOException

startDocument

protected void startDocument()
                      throws java.io.IOException
Specified by:
startDocument in class AbstractMapOutput
Throws:
java.io.IOException

endDocument

protected void endDocument()
                    throws java.io.IOException
Specified by:
endDocument in class AbstractMapOutput
Throws:
java.io.IOException