350 * first, then {@code s[1]}, and so on; the last character 351 * written is {@code s[s.length-1]}. 352 * 353 * <p> If the bit offset within the stream is non-zero, the 354 * remainder of the current byte is padded with 0s 355 * and written out first. The bit offset will be 0 after the 356 * write. 357 * 358 * @param s a {@code String} containing the value to be 359 * written. 360 * 361 * @exception NullPointerException if {@code s} is 362 * {@code null}. 363 * @exception IOException if an I/O error occurs. 364 */ 365 void writeChars(String s) throws IOException; 366 367 /** 368 * Writes two bytes of length information to the output stream in 369 * network byte order, followed by the 370 * <a href="../../../java/io/DataInput.html#modified-utf-8">modified 371 * UTF-8</a> 372 * representation of every character in the string {@code s}. 373 * If {@code s} is {@code null}, a 374 * {@code NullPointerException} is thrown. Each character in 375 * the string {@code s} is converted to a group of one, two, 376 * or three bytes, depending on the value of the character. 377 * 378 * <p> If a character {@code c} is in the range 379 * <code>\u0001</code> through <code>\u007f</code>, it is 380 * represented by one byte: 381 * 382 * <pre> 383 * (byte)c 384 * </pre> 385 * 386 * <p> If a character {@code c} is <code>\u0000</code> or 387 * is in the range <code>\u0080</code> through 388 * <code>\u07ff</code>, then it is represented by two bytes, 389 * to be written in the order shown: 390 * 391 * <pre><code> | 350 * first, then {@code s[1]}, and so on; the last character 351 * written is {@code s[s.length-1]}. 352 * 353 * <p> If the bit offset within the stream is non-zero, the 354 * remainder of the current byte is padded with 0s 355 * and written out first. The bit offset will be 0 after the 356 * write. 357 * 358 * @param s a {@code String} containing the value to be 359 * written. 360 * 361 * @exception NullPointerException if {@code s} is 362 * {@code null}. 363 * @exception IOException if an I/O error occurs. 364 */ 365 void writeChars(String s) throws IOException; 366 367 /** 368 * Writes two bytes of length information to the output stream in 369 * network byte order, followed by the 370 * <a href="../../../../java.base/java/io/DataInput.html#modified-utf-8"> 371 * modifiedUTF-8</a> 372 * representation of every character in the string {@code s}. 373 * If {@code s} is {@code null}, a 374 * {@code NullPointerException} is thrown. Each character in 375 * the string {@code s} is converted to a group of one, two, 376 * or three bytes, depending on the value of the character. 377 * 378 * <p> If a character {@code c} is in the range 379 * <code>\u0001</code> through <code>\u007f</code>, it is 380 * represented by one byte: 381 * 382 * <pre> 383 * (byte)c 384 * </pre> 385 * 386 * <p> If a character {@code c} is <code>\u0000</code> or 387 * is in the range <code>\u0080</code> through 388 * <code>\u07ff</code>, then it is represented by two bytes, 389 * to be written in the order shown: 390 * 391 * <pre><code> |