Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that the read methods will return as soon as they find some input data. By default, none of them guarantee that all the requested bytes will be read. It is left to the programmer to check the number of bytes read and call the read method again as required. This behavior is also a direct violation of EXP02-J. Do not ignore values returned by methods.

Multibyte encodings like UTF-8 are used for character sets that require more than one byte to uniquely identify each constituting character. For example, the Japanese encoding Shift-JIS (shown below), supports multibyte encoding where the maximum character length is 2 bytes (one leading and one trailing byte).

...

[API 06] Class InputStream, DataInputStream
[Phillips 05]
[Harold 99] Chapter 7: Data Streams, Reading Byte Arrays
[Chess 07] 8.1 Handling Errors with Return Codes

...

FIO02-J. Use Runtime.exec() correctly      07. Input Output (FIO)      07. Input Output (FIO)