| java.lang.Object tcl.lang.Channel tcl.lang.StdChannel
StdChannel | class StdChannel extends Channel (Code) | | Subclass of the abstract class Channel. It implements all of the
methods to perform read, write, open, close, etc on system stdio channels.
|
Field Summary | |
final static int | STDERR | final static int | STDIN Flags indicating the type of this StdChannel. | final static int | STDOUT |
STDERR | final static int STDERR(Code) | | |
STDIN | final static int STDIN(Code) | | Flags indicating the type of this StdChannel.
|
STDOUT | final static int STDOUT(Code) | | |
StdChannel | StdChannel()(Code) | | Constructor that does nothing. Open() must be called before
any of the subsequent read, write, etc calls can be made.
|
StdChannel | StdChannel(String stdName)(Code) | | Constructor that will automatically call open.
Parameters: stdName - name of the stdio channel; stdin, stderr or stdout. |
StdChannel | StdChannel(int type)(Code) | | |
close | void close() throws IOException(Code) | | Check for any output that might still need to be flushed
when the channel is closed.
|
open | String open(int type)(Code) | | Set the channel type to one of the three stdio types. Throw a
tclRuntimeEerror if the stdName is not one of the three types. If
it is a stdin channel, initialize the "in" data member. Since "in"
is static it may have already be initialized, test for this case
first. Set the names to fileX, this will be the key in the chanTable
hashtable to access this object. Note: it is not put into the hash
table in this function. The calling function is responsible for that.
Parameters: stdName - String that equals stdin, stdout, stderr The name of the channelId |
write | void write(Interp interp, TclObject outData) throws IOException, TclException(Code) | | Write to stdout or stderr. If the stdType is not set to
STDOUT or STDERR this is an error; either the stdType wasnt
correctly initialized, or this was called on a STDIN channel.
Parameters: interp - the current interpreter. Parameters: s - the string to write |
Methods inherited from tcl.lang.Channel | protected void checkRead(Interp interp) throws TclException(Code)(Java Doc) protected void checkWrite(Interp interp) throws TclException(Code)(Java Doc) void close() throws IOException(Code)(Java Doc) final boolean eof()(Code)(Java Doc) void flush(Interp interp) throws IOException, TclException(Code)(Java Doc) boolean getBlocking()(Code)(Java Doc) int getBufferSize()(Code)(Java Doc) int getBuffering()(Code)(Java Doc) String getChanName()(Code)(Java Doc) abstract String getChanType()(Code)(Java Doc) String getEncoding()(Code)(Java Doc) char getInputEofChar()(Code)(Java Doc) abstract protected InputStream getInputStream() throws IOException(Code)(Java Doc) int getInputTranslation()(Code)(Java Doc) int getNumBufferedInputBytes()(Code)(Java Doc) int getNumBufferedOutputBytes()(Code)(Java Doc) char getOutputEofChar()(Code)(Java Doc) abstract protected OutputStream getOutputStream() throws IOException(Code)(Java Doc) int getOutputTranslation()(Code)(Java Doc) int getRefCount()(Code)(Java Doc) protected void initInput() throws IOException(Code)(Java Doc) protected void initOutput() throws IOException(Code)(Java Doc) boolean inputSawCR()(Code)(Java Doc) boolean isBgFlushScheduled()(Code)(Java Doc) boolean isBlocked(Interp interp) throws TclException(Code)(Java Doc) boolean isReadOnly()(Code)(Java Doc) boolean isReadWrite()(Code)(Java Doc) boolean isWriteOnly()(Code)(Java Doc) int read(Interp interp, TclObject tobj, int readType, int numBytes) throws IOException, TclException(Code)(Java Doc) void seek(Interp interp, long offset, int mode) throws IOException, TclException(Code)(Java Doc) void setBlocking(boolean inBlocking)(Code)(Java Doc) void setBufferSize(int size)(Code)(Java Doc) void setBuffering(int inBuffering)(Code)(Java Doc) void setChanName(String chan)(Code)(Java Doc) void setEncoding(String inEncoding)(Code)(Java Doc) void setInputEofChar(char inEof)(Code)(Java Doc) void setInputTranslation(int translation)(Code)(Java Doc) void setOutputEofChar(char outEof)(Code)(Java Doc) void setOutputTranslation(int translation)(Code)(Java Doc) long tell() throws IOException(Code)(Java Doc) void write(Interp interp, TclObject outData) throws IOException, TclException(Code)(Java Doc) void write(Interp interp, String outStr) throws IOException, TclException(Code)(Java Doc)
|
|
|