question: public static void writeString ( DataOutputStream os , String s ) throws IOException { if ( s == null ) { os . writeInt ( - 1 ) ; } else { byte array [ ] = s . getBytes ( ) ; os . writeInt ( array . length ) ; os . write ( array ) ; } }
target:  write String to DataOutputStream motivation: DataInputStream.readUTF can't print lines larger than USHORTMAX