tcl.lang.channel
Class TclByteArrayChannel
java.lang.Object
tcl.lang.channel.Channel
tcl.lang.channel.TclByteArrayChannel
public class TclByteArrayChannel
- extends Channel
Read and write channel for byte arrays, in the form of TclObjects
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 |
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 |
TclByteArrayChannel
public TclByteArrayChannel(Interp interp,
TclObject object)
- Construct a TclByteArrayChannel that reads from a TclObject.
- Parameters:
interp
- This interpreterobject
- TclObject to read from.
TclByteArrayChannel
public TclByteArrayChannel(Interp interp)
- Construct a TclByteArrayChannel that writes to a TclObject.
- Parameters:
interp
-
getTclByteArray
public TclObject getTclByteArray()
- Returns:
- a TclObject containing byte array written to this channel. The
byte array is not decoded.
getTclString
public TclObject getTclString()
- Returns:
- a TclObject containing the data written to this channel, decoded
using the current system encoding
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.