public abstract class AbstractTextSinkFactory extends Object implements SinkFactory
SinkFactory for Text markup syntax. UTF-8 is used
when no encoding is specified.ROLE| Constructor and Description |
|---|
AbstractTextSinkFactory() |
| Modifier and Type | Method and Description |
|---|---|
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. |
protected abstract Sink |
createSink(Writer writer,
String encoding)
Create a text Sink for a given encoding.
|
public AbstractTextSinkFactory()
protected abstract Sink createSink(Writer writer, String encoding)
writer - The writer for the sink output, never null.encoding - The character encoding used by the writer.public Sink createSink(File outputDir, String outputName) throws IOException
Sink into a file.createSink in interface SinkFactoryoutputDir - the not-null output dir.outputName - the not-null output name.Sink instance with a file as output.IOException - if any.public Sink createSink(File outputDir, String outputName, String encoding) throws IOException
Sink into a file using a specified encoding.createSink in interface SinkFactoryoutputDir - the not-null output dir.outputName - the not-null output name.encoding - the output encoding.Sink instance with a file as output and using specified encoding.IOException - if any.SinkFactory.createSink(File, String)public Sink createSink(OutputStream out) throws IOException
Sink into an OutputStream.createSink in interface SinkFactoryout - not null OutputStream to write the result.Sink instance.IOException - if any.public Sink createSink(OutputStream out, String encoding) throws IOException
Sink into an OutputStream using a specified encoding.createSink in interface SinkFactoryout - not null OutputStream to write the result.encoding - the output encoding.Sink instance using specified encoding.IOException - if any.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.