1 /* |
1 /* |
2 * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
180 * If an exception is thrown from |
180 * If an exception is thrown from |
181 * this method, then it may be that some but |
181 * this method, then it may be that some but |
182 * not all bytes of {@code b} have been |
182 * not all bytes of {@code b} have been |
183 * updated with data from the input stream. |
183 * updated with data from the input stream. |
184 * |
184 * |
185 * @param b the buffer into which the data is read. |
185 * @param b the buffer into which the data is read. |
186 * @exception EOFException if this stream reaches the end before reading |
186 * @throws NullPointerException if {@code b} is {@code null}. |
187 * all the bytes. |
187 * @throws EOFException if this stream reaches the end before reading |
188 * @exception IOException if an I/O error occurs. |
188 * all the bytes. |
|
189 * @throws IOException if an I/O error occurs. |
189 */ |
190 */ |
190 void readFully(byte b[]) throws IOException; |
191 void readFully(byte b[]) throws IOException; |
191 |
192 |
192 /** |
193 /** |
193 * |
194 * |
224 * byte read is stored into element {@code b[off]}, |
225 * byte read is stored into element {@code b[off]}, |
225 * the next one into {@code b[off+1]}, |
226 * the next one into {@code b[off+1]}, |
226 * and so on. The number of bytes read is, |
227 * and so on. The number of bytes read is, |
227 * at most, equal to {@code len}. |
228 * at most, equal to {@code len}. |
228 * |
229 * |
229 * @param b the buffer into which the data is read. |
230 * @param b the buffer into which the data is read. |
230 * @param off an int specifying the offset into the data. |
231 * @param off an int specifying the offset in the data array {@code b}. |
231 * @param len an int specifying the number of bytes to read. |
232 * @param len an int specifying the number of bytes to read. |
232 * @exception EOFException if this stream reaches the end before reading |
233 * @throws NullPointerException if {@code b} is {@code null}. |
233 * all the bytes. |
234 * @throws IndexOutOfBoundsException if {@code off} is negative, |
234 * @exception IOException if an I/O error occurs. |
235 * {@code len} is negative, or {@code len} is greater than |
|
236 * {@code b.length - off}. |
|
237 * @throws EOFException if this stream reaches the end before reading |
|
238 * all the bytes. |
|
239 * @throws IOException if an I/O error occurs. |
235 */ |
240 */ |
236 void readFully(byte b[], int off, int len) throws IOException; |
241 void readFully(byte b[], int off, int len) throws IOException; |
237 |
242 |
238 /** |
243 /** |
239 * Makes an attempt to skip over |
244 * Makes an attempt to skip over |