public class StreamWriter
extends java.lang.Thread
Constructor and Description |
---|
StreamWriter(java.io.OutputStream connection)
Initializes and starts the StreamWriter thread.
|
Modifier and Type | Method and Description |
---|---|
void |
finish()
Cleans up afterwards, and closes the stream it opened
|
void |
run() |
void |
sendMessage(byte[] m)
Responsible for sending messages
|
void |
switchStream(java.io.OutputStream o) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public StreamWriter(java.io.OutputStream connection)
OutputStream
- The stream to write byte[]
topublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void sendMessage(byte[] m)
m
- Message to be sent as a byte[]
public void switchStream(java.io.OutputStream o)
public void finish()