net.sf.ofx4j.io.v1
Class OFXV1Writer

java.lang.Object
  extended by net.sf.ofx4j.io.v1.OFXV1Writer
All Implemented Interfaces:
OFXWriter
Direct Known Subclasses:
OFXV2Writer

public class OFXV1Writer
extends java.lang.Object
implements OFXWriter

OFX writer to SGML, suitable for OFX versions < 2.0.

Author:
Ryan Heaton

Field Summary
protected  boolean headersWritten
           
protected  java.io.Writer writer
           
 
Constructor Summary
OFXV1Writer(java.io.OutputStream out)
           
OFXV1Writer(java.io.Writer writer)
           
 
Method Summary
 void close()
          Close this OFX writer.
 void flush()
           
 boolean isWriteAttributesOnNewLine()
           
protected  java.io.OutputStreamWriter newWriter(java.io.OutputStream out)
           
protected  void print(char ch)
           
protected  void print(java.lang.String line)
           
protected  void println()
           
protected  void println(java.lang.String line)
           
 void setWriteAttributesOnNewLine(boolean writeAttributesOnNewLine)
           
 void writeElement(java.lang.String name, java.lang.String value)
          Write an element to the current aggregate.
 void writeEndAggregate(java.lang.String aggregateName)
          Write the end of an aggregate.
 void writeHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
          Write the specified headers.
 void writeStartAggregate(java.lang.String aggregateName)
          Write the start of a new aggregate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

headersWritten

protected boolean headersWritten

writer

protected final java.io.Writer writer
Constructor Detail

OFXV1Writer

public OFXV1Writer(java.io.OutputStream out)

OFXV1Writer

public OFXV1Writer(java.io.Writer writer)
Method Detail

newWriter

protected java.io.OutputStreamWriter newWriter(java.io.OutputStream out)
                                        throws java.io.UnsupportedEncodingException
Throws:
java.io.UnsupportedEncodingException

writeHeaders

public void writeHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
                  throws java.io.IOException
Description copied from interface: OFXWriter
Write the specified headers.

Specified by:
writeHeaders in interface OFXWriter
Parameters:
headers - The headers to be written.
Throws:
java.io.IOException

writeStartAggregate

public void writeStartAggregate(java.lang.String aggregateName)
                         throws java.io.IOException
Description copied from interface: OFXWriter
Write the start of a new aggregate.

Specified by:
writeStartAggregate in interface OFXWriter
Parameters:
aggregateName - The aggregate name.
Throws:
java.io.IOException

writeElement

public void writeElement(java.lang.String name,
                         java.lang.String value)
                  throws java.io.IOException
Description copied from interface: OFXWriter
Write an element to the current aggregate.

Specified by:
writeElement in interface OFXWriter
Parameters:
name - The name of the element.
value - The value of the element.
Throws:
java.io.IOException

writeEndAggregate

public void writeEndAggregate(java.lang.String aggregateName)
                       throws java.io.IOException
Description copied from interface: OFXWriter
Write the end of an aggregate.

Specified by:
writeEndAggregate in interface OFXWriter
Parameters:
aggregateName - The aggregate name.
Throws:
java.io.IOException

isWriteAttributesOnNewLine

public boolean isWriteAttributesOnNewLine()

setWriteAttributesOnNewLine

public void setWriteAttributesOnNewLine(boolean writeAttributesOnNewLine)

close

public void close()
           throws java.io.IOException
Description copied from interface: OFXWriter
Close this OFX writer.

Specified by:
close in interface OFXWriter
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

println

protected void println(java.lang.String line)
                throws java.io.IOException
Throws:
java.io.IOException

println

protected void println()
                throws java.io.IOException
Throws:
java.io.IOException

print

protected void print(java.lang.String line)
              throws java.io.IOException
Throws:
java.io.IOException

print

protected void print(char ch)
              throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2008. All Rights Reserved.