org.apache.maven.doxia.sink
Interface SinkFactory

All Known Implementing Classes:
AbstractBinarySinkFactory, AbstractTextSinkFactory, AbstractXmlSinkFactory, AptSinkFactory, ConfluenceSinkFactory, DocbookSinkFactory, FoSinkFactory, ITextSinkFactory, LatexSinkFactory, RtfSinkFactory, TWikiSinkFactory, XdocSinkFactory, XhtmlSinkFactory

public interface SinkFactory

A factory that creates a Sink object.

Since:
1.0-alpha-9
Version:
$Id: SinkFactory.java 736010 2009-01-20 13:06:57Z vsiveton $
Author:
Kenney Westerhof

Field Summary
static String ROLE
          The Plexus SinkFactory Role.
 
Method Summary
 Sink createSink(File outputDir, String outputName)
          Create a Sink into a file.
 Sink createSink(File outputDir, String outputName, String encoding)
          Create a Sink into a file using a specified encoding.
 Sink createSink(OutputStream out)
          Create a Sink into an OutputStream.
 Sink createSink(OutputStream out, String encoding)
          Create a Sink into an OutputStream using a specified encoding.
 

Field Detail

ROLE

static final String ROLE
The Plexus SinkFactory Role.

Method Detail

createSink

Sink createSink(File outputDir,
                String outputName)
                throws IOException
Create a Sink into a file.

Parameters:
outputDir - the not-null output dir.
outputName - the not-null output name.
Returns:
a Sink instance with a file as output.
Throws:
IOException - if any

createSink

Sink createSink(File outputDir,
                String outputName,
                String encoding)
                throws IOException
Create a Sink into a file using a specified encoding.

Parameters:
outputDir - the not-null output dir.
outputName - the not-null output name.
encoding - the output encoding.
Returns:
a Sink instance with a file as output and using specified encoding.
Throws:
IOException - if any
Since:
1.1
See Also:
createSink(File, String)

createSink

Sink createSink(OutputStream out)
                throws IOException
Create a Sink into an OutputStream.

Parameters:
out - not null OutputStream to write the result.
Returns:
a Sink instance.
Throws:
IOException - if any
Since:
1.1

createSink

Sink createSink(OutputStream out,
                String encoding)
                throws IOException
Create a Sink into an OutputStream using a specified encoding.

Parameters:
out - not null OutputStream to write the result.
encoding - the output encoding.
Returns:
a Sink instance using specified encoding.
Throws:
IOException - if any
Since:
1.1


Copyright © 2005-2012 The Apache Software Foundation. All Rights Reserved.