wtanaka.praya.gale
Class CountedUnicodeString

java.lang.Object
  |
  +--wtanaka.praya.gale.CountedUnicodeString

public class CountedUnicodeString
extends java.lang.Object

A String wrapper that implements write and getStreamLength() methods which include a count of the characters before the actual character data.

Return to Sourceforge or the Praya Homepage

Version:
$Name: $ $Date: 2001/09/30 21:14:52 $
Author:
$Author: wtanaka $

Field Summary
private  java.lang.String m_string
           
 
Constructor Summary
CountedUnicodeString(java.lang.String string)
           
 
Method Summary
 int getStreamLength()
          The number of bytes that write(GaleOutputStream) will add to the output stream.
 void write(GaleOutputStream output)
          Writes this CountedUnicodeString to the given output stream.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

m_string

private java.lang.String m_string
Constructor Detail

CountedUnicodeString

public CountedUnicodeString(java.lang.String string)
Method Detail

getStreamLength

public int getStreamLength()
The number of bytes that write(GaleOutputStream) will add to the output stream.
Returns:
the protocol length of this object in bytes.

write

public void write(GaleOutputStream output)
           throws java.io.IOException
Writes this CountedUnicodeString to the given output stream. Locks the output stream with a synchronized (output) to ensure thread safety on writes.
Parameters:
output - the stream on which to write.