--- old/src/share/classes/java/io/DataInput.java 2013-07-17 15:12:40.119649793 -0700 +++ new/src/share/classes/java/io/DataInput.java 2013-07-17 15:12:39.951649796 -0700 @@ -48,132 +48,87 @@ * may be thrown if the input stream has been * closed. * - *

Modified UTF-8

+ *

Modified UTF-8

*

* Implementations of the DataInput and DataOutput interfaces represent * Unicode strings in a format that is a slight modification of UTF-8. * (For information regarding the standard UTF-8 format, see section * 3.9 Unicode Encoding Forms of The Unicode Standard, Version * 4.0). - * Note that in the following tables, the most significant bit appears in the + * Note that in the following table, the most significant bit appears in the * far left-hand column. - *

- * All characters in the range {@code '\u005Cu0001'} to - * {@code '\u005Cu007F'} are represented by a single byte: * *

- * * + * + * + * * - * + * * * * - * + * + * + * * - *
+ * All characters in the range {@code '\u005Cu0001'} to + * {@code '\u005Cu007F'} are represented by a single byte:
Bit ValuesBit Values
Byte 1 - * - * - * - *
0
- *
bits 6-0
- *
- *
0
+ *
bits 6-0
+ *
+ * The null character {@code '\u005Cu0000'} and characters + * in the range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are + * represented by a pair of bytes:
- *
- * - *

- * The null character {@code '\u005Cu0000'} and characters in the - * range {@code '\u005Cu0080'} to {@code '\u005Cu07FF'} are - * represented by a pair of bytes: - * - *

- * * * - * + * * * * - * + * * * - * + * + * + * * - *
Bit ValuesBit Values
Byte 1 - * - * - * - *
1
- *
1
- *
0
- *
bits 10-6
- *
- *
1
+ *
1
+ *
0
+ *
bits 10-6
*
Byte 2 - * - * - * - *
1
- *
0
- *
bits 5-0
- *
- *
1
+ *
0
+ *
bits 5-0
+ *
+ * {@code char} values in the range {@code '\u005Cu0800'} + * to {@code '\u005CuFFFF'} are represented by three bytes:
- *
- * - *
- * {@code char} values in the range {@code '\u005Cu0800'} to - * {@code '\u005CuFFFF'} are represented by three bytes: - * - *
- * * * - * + * * * * - * + * * * - * + * * * - * + * *
Bit ValuesBit Values
Byte 1 - * - * - * - *
1
- *
1
- *
1
- *
0
- *
bits 15-12
- *
- *
1
+ *
1
+ *
1
+ *
0
+ *
bits 15-12
*
Byte 2 - * - * - * - *
1
- *
0
- *
bits 11-6
- *
- *
1
+ *
0
+ *
bits 11-6
*
Byte 3 - * - * - * - *
1
- *
0
- *
bits 5-0
- *
- *
1
+ *
0
+ *
bits 5-0
*
- *
- * + * *

* The differences between this format and the * standard UTF-8 format are the following: