| java.lang.Object java.io.InputStream com.martiansoftware.nailgun.ThreadLocalInputStream
ThreadLocalInputStream | class ThreadLocalInputStream extends InputStream (Code) | | The class name is pretty descriptive. This creates an InputStream
much like a FilterInputStream, but with the wrapped InputStream
being local to the current Thread. By setting System.in to a
ThreadLocalInputStream, different Threads can read from different
InputStreams simply by using System.in. Of course, the init()
method must be called by the Thread that wishes to use the
wrapped stream.
author: Marty Lamb |
ThreadLocalInputStream | ThreadLocalInputStream(InputStream defaultInputStream)(Code) | | Parameters: defaultInputStream - the InputStream that will be used if thecurrent thread has not called init() |
getInputStream | InputStream getInputStream()(Code) | | Returns this thread's InputStream
this thread's InputStream |
init | void init(InputStream streamForCurrentThread)(Code) | | Sets the InputStream for the current thread
Parameters: streamForCurrentThread - the InputStream for the current thread |
|
|