public static void putString ( IoBuffer buf , String string ) { final byte [ ] encoded = encodeString ( string ) ; if ( encoded . length < AMF . LONG_STRING_LENGTH ) { // write unsigned short buf . put ( ( byte ) ( ( encoded . length >> 8 ) & 0xff ) ) ; buf . put ( ( byte ) ( encoded . length & 0xff ) ) ; } else { buf . putInt ( encoded . length ) ; } buf . put ( encoded ) ; }
Write out string