threads
Class WriterThread

java.lang.Object
  extended by java.lang.Thread
      extended by threads.WriterThread
All Implemented Interfaces:
java.lang.Runnable, IWriterThread

public final class WriterThread
extends java.lang.Thread
implements IWriterThread

Writer Thread Writes bytes to an outputstream


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
WriterThread(java.io.OutputStream _writer, ExceptionListener _exListener)
           
 
Method Summary
 void run()
          Run Thread
static int strlen(java.lang.String s)
          Find length in bytes of a string, akin to strlen vs wcslen � 2003, 2004 Vidar Holen www.vidarholen.net
 void terminate()
          Tells the thread to terminate as soon as possible.
 byte[] unicodeToServer(java.lang.String s)
          Unicode Support � 2003, 2004 Vidar Holen www.vidarholen.net
 void write(java.lang.String _s)
          Sends a string in the output stream.
 
Methods inherited from class java.lang.Thread
activeCount, currentThread, getName, getPriority, interrupt, isAlive, join, setPriority, sleep, start, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface threads.IWriterThread
start
 

Constructor Detail

WriterThread

public WriterThread(java.io.OutputStream _writer,
                    ExceptionListener _exListener)
Method Detail

write

public void write(java.lang.String _s)
Sends a string in the output stream.

Specified by:
write in interface IWriterThread
Parameters:
_s - String to send to the output stream

terminate

public void terminate()
Tells the thread to terminate as soon as possible.

Specified by:
terminate in interface IWriterThread

run

public void run()
Run Thread

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

unicodeToServer

public byte[] unicodeToServer(java.lang.String s)
Unicode Support � 2003, 2004 Vidar Holen www.vidarholen.net


strlen

public static int strlen(java.lang.String s)
Find length in bytes of a string, akin to strlen vs wcslen � 2003, 2004 Vidar Holen www.vidarholen.net