< prev index next >

src/java.base/share/classes/java/io/DataInput.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea

*** 266,276 **** * The actual * number of bytes skipped is returned. * * @param n the number of bytes to be skipped. * @return the number of bytes actually skipped. ! * @exception IOException if an I/O error occurs. */ int skipBytes(int n) throws IOException; /** * Reads one input byte and returns --- 266,276 ---- * The actual * number of bytes skipped is returned. * * @param n the number of bytes to be skipped. * @return the number of bytes actually skipped. ! * @throws IOException if an I/O error occurs. */ int skipBytes(int n) throws IOException; /** * Reads one input byte and returns
*** 279,291 **** * This method is suitable for reading * the byte written by the {@code writeBoolean} * method of interface {@code DataOutput}. * * @return the {@code boolean} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ boolean readBoolean() throws IOException; /** * Reads and returns one input byte. --- 279,291 ---- * This method is suitable for reading * the byte written by the {@code writeBoolean} * method of interface {@code DataOutput}. * * @return the {@code boolean} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ boolean readBoolean() throws IOException; /** * Reads and returns one input byte.
*** 295,307 **** * This method is suitable for * reading the byte written by the {@code writeByte} * method of interface {@code DataOutput}. * * @return the 8-bit value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ byte readByte() throws IOException; /** * Reads one input byte, zero-extends --- 295,307 ---- * This method is suitable for * reading the byte written by the {@code writeByte} * method of interface {@code DataOutput}. * * @return the 8-bit value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ byte readByte() throws IOException; /** * Reads one input byte, zero-extends
*** 315,327 **** * if the argument to {@code writeByte} * was intended to be a value in the range * {@code 0} through {@code 255}. * * @return the unsigned 8-bit value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ int readUnsignedByte() throws IOException; /** * Reads two input bytes and returns --- 315,327 ---- * if the argument to {@code writeByte} * was intended to be a value in the range * {@code 0} through {@code 255}. * * @return the unsigned 8-bit value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ int readUnsignedByte() throws IOException; /** * Reads two input bytes and returns
*** 336,348 **** * is suitable for reading the bytes written * by the {@code writeShort} method of * interface {@code DataOutput}. * * @return the 16-bit value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ short readShort() throws IOException; /** * Reads two input bytes and returns --- 336,348 ---- * is suitable for reading the bytes written * by the {@code writeShort} method of * interface {@code DataOutput}. * * @return the 16-bit value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ short readShort() throws IOException; /** * Reads two input bytes and returns
*** 359,371 **** * the argument to {@code writeShort} * was intended to be a value in the range * {@code 0} through {@code 65535}. * * @return the unsigned 16-bit value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ int readUnsignedShort() throws IOException; /** * Reads two input bytes and returns a {@code char} value. --- 359,371 ---- * the argument to {@code writeShort} * was intended to be a value in the range * {@code 0} through {@code 65535}. * * @return the unsigned 16-bit value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ int readUnsignedShort() throws IOException; /** * Reads two input bytes and returns a {@code char} value.
*** 379,391 **** * is suitable for reading bytes written by * the {@code writeChar} method of interface * {@code DataOutput}. * * @return the {@code char} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ char readChar() throws IOException; /** * Reads four input bytes and returns an --- 379,391 ---- * is suitable for reading bytes written by * the {@code writeChar} method of interface * {@code DataOutput}. * * @return the {@code char} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ char readChar() throws IOException; /** * Reads four input bytes and returns an
*** 398,410 **** * This method is suitable * for reading bytes written by the {@code writeInt} * method of interface {@code DataOutput}. * * @return the {@code int} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ int readInt() throws IOException; /** * Reads eight input bytes and returns --- 398,410 ---- * This method is suitable * for reading bytes written by the {@code writeInt} * method of interface {@code DataOutput}. * * @return the {@code int} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ int readInt() throws IOException; /** * Reads eight input bytes and returns
*** 425,437 **** * This method is suitable * for reading bytes written by the {@code writeLong} * method of interface {@code DataOutput}. * * @return the {@code long} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ long readLong() throws IOException; /** * Reads four input bytes and returns --- 425,437 ---- * This method is suitable * for reading bytes written by the {@code writeLong} * method of interface {@code DataOutput}. * * @return the {@code long} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ long readLong() throws IOException; /** * Reads four input bytes and returns
*** 445,457 **** * This method is suitable for reading * bytes written by the {@code writeFloat} * method of interface {@code DataOutput}. * * @return the {@code float} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ float readFloat() throws IOException; /** * Reads eight input bytes and returns --- 445,457 ---- * This method is suitable for reading * bytes written by the {@code writeFloat} * method of interface {@code DataOutput}. * * @return the {@code float} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ float readFloat() throws IOException; /** * Reads eight input bytes and returns
*** 465,477 **** * This method is suitable for reading * bytes written by the {@code writeDouble} * method of interface {@code DataOutput}. * * @return the {@code double} value read. ! * @exception EOFException if this stream reaches the end before reading * all the bytes. ! * @exception IOException if an I/O error occurs. */ double readDouble() throws IOException; /** * Reads the next line of text from the input stream. --- 465,477 ---- * This method is suitable for reading * bytes written by the {@code writeDouble} * method of interface {@code DataOutput}. * * @return the {@code double} value read. ! * @throws EOFException if this stream reaches the end before reading * all the bytes. ! * @throws IOException if an I/O error occurs. */ double readDouble() throws IOException; /** * Reads the next line of text from the input stream.
*** 508,518 **** * that is, {@code (char)256}. * * @return the next line of text from the input stream, * or {@code null} if the end of file is * encountered before a byte can be read. ! * @exception IOException if an I/O error occurs. */ String readLine() throws IOException; /** * Reads in a string that has been encoded using a --- 508,518 ---- * that is, {@code (char)256}. * * @return the next line of text from the input stream, * or {@code null} if the end of file is * encountered before a byte can be read. ! * @throws IOException if an I/O error occurs. */ String readLine() throws IOException; /** * Reads in a string that has been encoded using a
*** 591,603 **** * The {@code writeUTF} * method of interface {@code DataOutput} * may be used to write data that is suitable * for reading by this method. * @return a Unicode string. ! * @exception EOFException if this stream reaches the end * before reading all the bytes. ! * @exception IOException if an I/O error occurs. ! * @exception UTFDataFormatException if the bytes do not represent a * valid modified UTF-8 encoding of a string. */ String readUTF() throws IOException; } --- 591,603 ---- * The {@code writeUTF} * method of interface {@code DataOutput} * may be used to write data that is suitable * for reading by this method. * @return a Unicode string. ! * @throws EOFException if this stream reaches the end * before reading all the bytes. ! * @throws IOException if an I/O error occurs. ! * @throws UTFDataFormatException if the bytes do not represent a * valid modified UTF-8 encoding of a string. */ String readUTF() throws IOException; }
< prev index next >