public Transfer writeString(String s) throws IOException {
  if (s == null) {
    out.writeInt(-1);
  }
 else {
    int len=s.length();
    out.writeInt(len);
    for (int i=0; i < len; i++) {
      out.writeChar(s.charAt(i));
    }
  }
  return this;
}

public Transfer writeString ( String s ) throws IOException { if ( s == null ) { out . writeInt ( - 1 ) ; } else { int len = s . length ( ) ; out . writeInt ( len ) ; for ( int i = 0 ; i < len ; i ++ ) { out . writeChar ( s . charAt ( i ) ) ; } } return this ; }
write a string . the maximum string length is integer . max_value .
