126 * <td><center>1</center>
127 * <td><center>0</center>
128 * <td colspan="6"><center>bits 5-0</center>
129 * </tr>
130 * </table>
131 * </blockquote>
132 * <p>
133 * The differences between this format and the
134 * standard UTF-8 format are the following:
135 * <ul>
136 * <li>The null byte {@code '\u005Cu0000'} is encoded in 2-byte format
137 * rather than 1-byte, so that the encoded strings never have
138 * embedded nulls.
139 * <li>Only the 1-byte, 2-byte, and 3-byte formats are used.
140 * <li><a href="../lang/Character.html#unicode">Supplementary characters</a>
141 * are represented in the form of surrogate pairs.
142 * </ul>
143 * @author Frank Yellin
144 * @see java.io.DataInputStream
145 * @see java.io.DataOutput
146 * @since JDK1.0
147 */
148 public
149 interface DataInput {
150 /**
151 * Reads some bytes from an input
152 * stream and stores them into the buffer
153 * array {@code b}. The number of bytes
154 * read is equal
155 * to the length of {@code b}.
156 * <p>
157 * This method blocks until one of the
158 * following conditions occurs:
159 * <ul>
160 * <li>{@code b.length}
161 * bytes of input data are available, in which
162 * case a normal return is made.
163 *
164 * <li>End of
165 * file is detected, in which case an {@code EOFException}
166 * is thrown.
|
126 * <td><center>1</center>
127 * <td><center>0</center>
128 * <td colspan="6"><center>bits 5-0</center>
129 * </tr>
130 * </table>
131 * </blockquote>
132 * <p>
133 * The differences between this format and the
134 * standard UTF-8 format are the following:
135 * <ul>
136 * <li>The null byte {@code '\u005Cu0000'} is encoded in 2-byte format
137 * rather than 1-byte, so that the encoded strings never have
138 * embedded nulls.
139 * <li>Only the 1-byte, 2-byte, and 3-byte formats are used.
140 * <li><a href="../lang/Character.html#unicode">Supplementary characters</a>
141 * are represented in the form of surrogate pairs.
142 * </ul>
143 * @author Frank Yellin
144 * @see java.io.DataInputStream
145 * @see java.io.DataOutput
146 * @since 1.0
147 */
148 public
149 interface DataInput {
150 /**
151 * Reads some bytes from an input
152 * stream and stores them into the buffer
153 * array {@code b}. The number of bytes
154 * read is equal
155 * to the length of {@code b}.
156 * <p>
157 * This method blocks until one of the
158 * following conditions occurs:
159 * <ul>
160 * <li>{@code b.length}
161 * bytes of input data are available, in which
162 * case a normal return is made.
163 *
164 * <li>End of
165 * file is detected, in which case an {@code EOFException}
166 * is thrown.
|