tcl.lang.channel
Class StdChannel

java.lang.Object
  extended by tcl.lang.channel.Channel
      extended by tcl.lang.channel.StdChannel

public class StdChannel
extends Channel

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
static int STDERR
          Used to indicate that this channel is a standard error channel
static int STDIN
          Used to indicate that this channel is a standard input channel
static int STDOUT
          Used to indicate that this channel is a standard output channel
 
Fields inherited from class tcl.lang.channel.Channel
blocking, buffering, bufferSize, encoding, eofInputFilter, eofOutputFilter, eolInputFilter, eolOutputFilter, finalInputStream, finalReader, firstOutputStream, firstWriter, inputBuffer, inputEofChar, inputTranslation, markableInputStream, mode, nonBlockingOutputStream, outputBuffer, outputEofChar, outputTranslation, rawInputStream, rawOutputStream, READ_OWNERSHIP, refCount, unicodeDecoder, unicodeEncoder, WRITE_OWNERSHIP
 
Constructor Summary
StdChannel(int type)
           
 
Method Summary
protected  InputStream getInputStream()
          This method should be overridden in the subclass to provide a channel specific InputStream object.
protected  OutputStream getOutputStream()
          This method should be overridden in the subclass to provide a channel specific OutputStream object.
static void setErr(PrintStream err)
          Deprecated. 
static void setIn(InputStream in)
          Deprecated. 
static void setOut(PrintStream out)
          Deprecated. 
 
Methods inherited from class tcl.lang.channel.Channel
checkRead, checkWrite, close, eof, flush, getBlocking, getBuffering, getBufferSize, getChanName, getEncoding, getInputEofChar, getInputTranslation, getOutputEofChar, getOutputTranslation, initInput, initOutput, isBlocked, isClosed, isReadOnly, isReadWrite, isWriteOnly, read, seek, setBlocking, setBuffering, setBufferSize, setEncoding, setInputEofChar, setInputTranslation, setOutputEofChar, setOutputTranslation, setOwnership, setOwnership, tell, waitForOwnership, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STDIN

public static final int STDIN
Used to indicate that this channel is a standard input channel

See Also:
Constant Field Values

STDOUT

public static final int STDOUT
Used to indicate that this channel is a standard output channel

See Also:
Constant Field Values

STDERR

public static final int STDERR
Used to indicate that this channel is a standard error channel

See Also:
Constant Field Values
Constructor Detail

StdChannel

public StdChannel(int type)
Method Detail

setIn

@Deprecated
public static void setIn(InputStream in)
Deprecated. 

Reassign the standard input stream to a new stream. This will change the underlying stream for all interpreters. This use is deprecated; applications should unregister the stdin Channel and open a new Channel to replace stdin.

Parameters:
in - InputStream to replace standard input with

setOut

@Deprecated
public static void setOut(PrintStream out)
Deprecated. 

Reassign the standard output stream to a new stream. This will change the underlying stream for all interpreters. This use is deprecated; applications should unregister the stdout Channel and open a new Channel to replace it.

Parameters:
out - OutputStream to replace standard input with

setErr

@Deprecated
public static void setErr(PrintStream err)
Deprecated. 

Reassign the standard error stream to a new stream. This will change the underlying stream for all interpreters. This use is deprecated; applications should unregister the stderr Channel and open a new Channel to replace it.

Parameters:
err - OutputStream to replace standard input with

getInputStream

protected InputStream getInputStream()
                              throws IOException
Description copied from class: Channel
This method should be overridden in the subclass to provide a channel specific InputStream object.

Specified by:
getInputStream in class Channel
Throws:
IOException

getOutputStream

protected OutputStream getOutputStream()
                                throws IOException
Description copied from class: Channel
This method should be overridden in the subclass to provide a channel specific OutputStream object.

Specified by:
getOutputStream in class Channel
Throws:
IOException


Copyright © 2015. All rights reserved.