Constructor and Description |
---|
DfaRunFeeder(DfaRun r,
java.lang.String csname)
creates the
Feeder to filter source
with the given dfa and then feed it to an
OutputStream while encoding characters with the
character set given by csname . |
Modifier and Type | Method and Description |
---|---|
void |
setOut(java.io.OutputStream out,
boolean closeOnExit)
specifies the
OutputStream where to deliver the
data in the run() method. |
void |
setSource(DfaRun r)
specifies the source
java.lang.Reader from which to
fetch the data to feed. |
getException, run, setIn
public DfaRunFeeder(DfaRun r, java.lang.String csname) throws java.nio.charset.UnsupportedCharsetException
creates the Feeder
to filter source
with the given dfa
and then feed it to an
OutputStream
while encoding characters with the
character set given by csname
.
r
- is the DfaRun
from which to read input
data. May be null
, but then it must be set
with setSource()
before using this object.csname
- specifies the character set used to encode
characters when feeding them to the output stream.java.nio.charset.UnsupportedCharsetException
public void setSource(DfaRun r)
specifies the source java.lang.Reader
from which to
fetch the data to feed.
Hint: Do not use the inherited method
setIn()
. If you need a Feeder
with an
InputStream
as the source, use Pipe
.
public void setOut(java.io.OutputStream out, boolean closeOnExit)
Feeder
specifies the OutputStream
where to deliver the
data in the run()
method.
setOut
in interface Feeder
setOut
in class AbstractPipe
closeOnExit
- if true, instructs the Feeder
to close
out
before exiting run()
.