public class GenericFilterWriter extends Object implements IFilterWriter
| Modifier and Type | Field and Description |
|---|---|
protected OutputStreamWriter |
writer |
| Constructor and Description |
|---|
GenericFilterWriter() |
GenericFilterWriter(ISkeletonWriter skelWriter,
EncoderManager encoderManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the current process.
|
void |
close()
Closes the output.
|
protected CharsetEncoder |
createCharsetEncoder(String encodingtoUse)
Provides sub-classes an opportunity to creates the character set encoder for the output.
|
String |
getDefEncoding() |
EncoderManager |
getEncoderManager()
Gets the current encoder manager for this writer.
|
protected String |
getEncoding() |
LocaleId |
getLocale() |
String |
getName()
Gets the name of this writer.
|
protected String |
getOutputPath() |
IParameters |
getParameters()
Gets the current parameters for this writer.
|
ISkeletonWriter |
getSkeletonWriter()
Gets the skeleton writer associated with this writer.
|
Event |
handleEvent(Event event)
Handles the filter events.
|
protected void |
processDocumentPart(DocumentPart resource) |
protected void |
processEndDocument(Ending resource) |
protected void |
processEndGroup(Ending resource) |
protected void |
processEndSubDocument(Ending resource) |
protected void |
processEndSubfilter(EndSubfilter resource) |
protected void |
processStartDocument(LocaleId outputLocale,
String outputEncoding,
StartDocument resource) |
protected void |
processStartGroup(StartGroup resource) |
protected void |
processStartSubDocument(StartSubDocument resource) |
protected void |
processStartSubfilter(StartSubfilter resource) |
protected void |
processTextUnit(ITextUnit resource) |
protected void |
setEncoderManager(EncoderManager encoderManager) |
protected void |
setEncoding(String encoding) |
protected void |
setLocale(LocaleId locale) |
void |
setOptions(LocaleId locale,
String defaultEncoding)
Sets the options for this writer.
|
void |
setOutput(OutputStream output)
Sets the output through its output stream.
|
void |
setOutput(String path)
Sets the output through the path of the output file.
|
void |
setParameters(IParameters params)
Sets new parameters for this writer.
|
protected void |
setSkelWriter(ISkeletonWriter skelWriter) |
protected OutputStreamWriter writer
public GenericFilterWriter()
public GenericFilterWriter(ISkeletonWriter skelWriter, EncoderManager encoderManager)
public void cancel()
IFilterWritercancel in interface IFilterWriterpublic void close()
IFilterWriterclose in interface AutoCloseableclose in interface IFilterWriterpublic String getName()
IFilterWritergetName in interface IFilterWriterpublic EncoderManager getEncoderManager()
IFilterWritergetEncoderManager in interface IFilterWriterpublic ISkeletonWriter getSkeletonWriter()
IFilterWritergetSkeletonWriter in interface IFilterWriterprotected void setSkelWriter(ISkeletonWriter skelWriter)
public IParameters getParameters()
IFilterWritergetParameters in interface IFilterWriterpublic Event handleEvent(Event event)
IFilterWriterhandleEvent in interface IFilterWriterevent - The event to process.protected void processStartDocument(LocaleId outputLocale, String outputEncoding, StartDocument resource) throws IOException
IOExceptionprotected void processEndDocument(Ending resource) throws IOException
IOExceptionprotected void processStartSubDocument(StartSubDocument resource) throws IOException
IOExceptionprotected void processEndSubDocument(Ending resource) throws IOException
IOExceptionprotected void processStartGroup(StartGroup resource) throws IOException
IOExceptionprotected void processEndGroup(Ending resource) throws IOException
IOExceptionprotected void processTextUnit(ITextUnit resource) throws IOException
IOExceptionprotected void processDocumentPart(DocumentPart resource) throws IOException
IOExceptionprotected void processStartSubfilter(StartSubfilter resource) throws IOException
IOExceptionprotected void processEndSubfilter(EndSubfilter resource) throws IOException
IOExceptionpublic void setOptions(LocaleId locale, String defaultEncoding)
IFilterWritersetOptions in interface IFilterWriterlocale - the output locale.defaultEncoding - Name of the character set encoding for the output.public void setOutput(String path)
IFilterWritersetOutput in interface IFilterWriterpath - Full path of the output file.public void setOutput(OutputStream output)
IFilterWritersetOutput in interface IFilterWriteroutput - Output stream to use for the output.public void setParameters(IParameters params)
IFilterWritersetParameters in interface IFilterWriterparams - The new parameters to use.protected CharsetEncoder createCharsetEncoder(String encodingtoUse)
encodingtoUse - the name of the encoding to use.public final LocaleId getLocale()
public final String getDefEncoding()
protected String getEncoding()
protected void setEncoding(String encoding)
protected String getOutputPath()
protected void setLocale(LocaleId locale)
protected void setEncoderManager(EncoderManager encoderManager)
Copyright © 2022. All rights reserved.