public abstract class AbstractFilter extends Object implements Runnable
Constructor and Description |
---|
AbstractFilter() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
applyFilter()
Reads data to be transformed from the
filter input stream and
write transformed data to the filter output stream . |
void |
close()
Terminates filter output.
|
protected InputStream |
getFilterInput()
Returns the stream that provides input to the filter.
|
protected OutputStream |
getFilterOutput()
Returns the stream that provides output from the filter.
|
OutputStream |
getSource()
Returns the source for filter input.
|
OutputStream |
getTarget()
Returns the target for filter output.
|
protected void |
initializeFilter(InputStream filterInput,
OutputStream filterOutput)
Initializes the filter.
|
void |
run() |
void |
setTarget(File target)
Changes the target for filter output.
|
void |
setTarget(OutputStream target)
Changes the target for filter output.
|
public void setTarget(File target)
public void setTarget(OutputStream target)
public OutputStream getTarget()
public OutputStream getSource()
protected void initializeFilter(InputStream filterInput, OutputStream filterOutput)
protected InputStream getFilterInput()
protected OutputStream getFilterOutput()
protected abstract void applyFilter() throws Exception
filter input stream
and
write transformed data to the filter output stream
.Exception
public void close()
Copyright © 2024 The Cornutum Project. All rights reserved.