public void printLenString(String v) throws IOException {
  if (SIZE < _offset + 16)   flushBuffer();
  if (v == null) {
    _buffer[_offset++]=(byte)(0);
    _buffer[_offset++]=(byte)(0);
  }
 else {
    int len=v.length();
    _buffer[_offset++]=(byte)(len >> 8);
    _buffer[_offset++]=(byte)(len);
    printString(v,0,len);
  }
}

public void printLenString ( String v ) throws IOException { if ( SIZE < _offset + 16 ) flushBuffer ( ) ; if ( v == null ) { _buffer [ _offset ++ ] = ( byte ) ( 0 ) ; _buffer [ _offset ++ ] = ( byte ) ( 0 ) ; } else { int len = v . length ( ) ; _buffer [ _offset ++ ] = ( byte ) ( len > > 8 ) ; _buffer [ _offset ++ ] = ( byte ) ( len ) ; printString ( v , 0 , len ) ; } }
prints a string to the stream , encoded as utf - 8 with preceeding length
