org.apache.abdera.util
Class AbstractWriter

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

public abstract class AbstractWriter
extends Object
implements Writer


Field Summary
protected  WriterOptions options
           
 
Constructor Summary
AbstractWriter()
           
 
Method Summary
protected  void finishCompressedOutputStream(OutputStream out, WriterOptions options)
           
protected  OutputStream getCompressedOutputStream(OutputStream out, WriterOptions options)
           
 WriterOptions getDefaultWriterOptions()
           
protected abstract  WriterOptions initDefaultWriterOptions()
           
 Writer setDefaultWriterOptions(WriterOptions options)
           
 Object write(Base base)
          Return the serialized form of the Abdera Base
 void writeTo(Base base, OutputStream out)
          Serialized the given Abdera Base to the given outputstream
 void writeTo(Base base, WritableByteChannel out)
           
 void writeTo(Base base, WritableByteChannel out, WriterOptions options)
           
 void writeTo(Base base, 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 Writer setDefaultWriterOptions(WriterOptions options)
Specified by:
setDefaultWriterOptions in interface Writer

write

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

Specified by:
write in interface Writer
Throws:
IOException

writeTo

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

Specified by:
writeTo in interface Writer
Throws:
IOException

writeTo

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

Specified by:
writeTo in interface Writer
Throws:
IOException

getCompressedOutputStream

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

finishCompressedOutputStream

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

writeTo

public void writeTo(Base base,
                    WritableByteChannel out,
                    WriterOptions options)
             throws IOException
Specified by:
writeTo in interface Writer
Throws:
IOException

writeTo

public void writeTo(Base base,
                    WritableByteChannel out)
             throws IOException
Specified by:
writeTo in interface Writer
Throws:
IOException


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.