org.apache.abdera.util
Class AbstractNamedWriter

java.lang.Object
  extended by org.apache.abdera.util.AbstractWriter
      extended by org.apache.abdera.util.AbstractNamedWriter
All Implemented Interfaces:
NamedWriter, Writer

public abstract class AbstractNamedWriter
extends AbstractWriter
implements NamedWriter

Base abstract implementation of NamedWriter


Field Summary
protected  java.lang.String[] formats
           
protected  java.lang.String name
           
 
Fields inherited from class org.apache.abdera.util.AbstractWriter
options
 
Constructor Summary
protected AbstractNamedWriter(java.lang.String name, java.lang.String... formats)
           
 
Method Summary
 java.lang.String getName()
          Return the name used to acquire an instance of this Writer (case insensitive)
 java.lang.String[] getOutputFormats()
          Return a listing of MIME Media formats this NamedWriter is capable of outputting.
 boolean outputsFormat(java.lang.String mediatype)
          Returns true if the format produced by this writer matches the specified media type
 
Methods inherited from class org.apache.abdera.util.AbstractWriter
finishCompressedOutputStream, getCompressedOutputStream, getDefaultWriterOptions, initDefaultWriterOptions, setDefaultWriterOptions, write, writeTo, writeTo
 
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
getDefaultWriterOptions, write, write, writeTo, writeTo, writeTo, writeTo
 

Field Detail

name

protected final java.lang.String name

formats

protected final java.lang.String[] formats
Constructor Detail

AbstractNamedWriter

protected AbstractNamedWriter(java.lang.String name,
                              java.lang.String... formats)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: NamedWriter
Return the name used to acquire an instance of this Writer (case insensitive)

Specified by:
getName in interface NamedWriter

getOutputFormats

public java.lang.String[] getOutputFormats()
Description copied from interface: NamedWriter
Return a listing of MIME Media formats this NamedWriter is capable of outputting.

Specified by:
getOutputFormats in interface NamedWriter

outputsFormat

public boolean outputsFormat(java.lang.String mediatype)
Description copied from interface: NamedWriter
Returns true if the format produced by this writer matches the specified media type

Specified by:
outputsFormat in interface NamedWriter