org.apache.abdera.util
Class AbstractWriter

java.lang.Object
  extended by org.apache.abdera.util.AbstractWriter
All Implemented Interfaces:
Writer
Direct Known Subclasses:
AbstractNamedWriter

public abstract class AbstractWriter
extends java.lang.Object
implements Writer


Field Summary
protected  WriterOptions options
           
 
Constructor Summary
AbstractWriter()
           
 
Method Summary
protected  void finishCompressedOutputStream(java.io.OutputStream out, WriterOptions options)
           
protected  java.io.OutputStream getCompressedOutputStream(java.io.OutputStream out, WriterOptions options)
           
 WriterOptions getDefaultWriterOptions()
           
protected abstract  WriterOptions initDefaultWriterOptions()
           
 void setDefaultWriterOptions(WriterOptions options)
           
 java.lang.Object write(Base base)
          Return the serialized form of the Abdera Base
 void writeTo(Base base, java.io.OutputStream out)
          Serialized the given Abdera Base to the given outputstream
 void writeTo(Base base, java.io.Writer out)
          Serialized the given Abdera Base to the given writer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.writer.Writer
write, writeTo, writeTo
 

Field Detail

options

protected WriterOptions options
Constructor Detail

AbstractWriter

public AbstractWriter()
Method Detail

getDefaultWriterOptions

public WriterOptions getDefaultWriterOptions()
Specified by:
getDefaultWriterOptions in interface Writer

initDefaultWriterOptions

protected abstract WriterOptions initDefaultWriterOptions()

setDefaultWriterOptions

public void setDefaultWriterOptions(WriterOptions options)

write

public java.lang.Object write(Base base)
                       throws java.io.IOException
Description copied from interface: Writer
Return the serialized form of the Abdera Base

Specified by:
write in interface Writer
Throws:
java.io.IOException

writeTo

public void writeTo(Base base,
                    java.io.OutputStream out)
             throws java.io.IOException
Description copied from interface: Writer
Serialized the given Abdera Base to the given outputstream

Specified by:
writeTo in interface Writer
Throws:
java.io.IOException

writeTo

public void writeTo(Base base,
                    java.io.Writer out)
             throws java.io.IOException
Description copied from interface: Writer
Serialized the given Abdera Base to the given writer

Specified by:
writeTo in interface Writer
Throws:
java.io.IOException

getCompressedOutputStream

protected java.io.OutputStream getCompressedOutputStream(java.io.OutputStream out,
                                                         WriterOptions options)
                                                  throws java.io.IOException
Throws:
java.io.IOException

finishCompressedOutputStream

protected void finishCompressedOutputStream(java.io.OutputStream out,
                                            WriterOptions options)
                                     throws java.io.IOException
Throws:
java.io.IOException