src/java.desktop/share/classes/javax/imageio/stream/ImageInputStreamImpl.java

Print this page

        

*** 223,233 **** } return ch; } public short readShort() throws IOException { ! if (read(byteBuf, 0, 2) < 0) { throw new EOFException(); } if (byteOrder == ByteOrder.BIG_ENDIAN) { return (short) --- 223,233 ---- } return ch; } public short readShort() throws IOException { ! if (read(byteBuf, 0, 2) != 2) { throw new EOFException(); } if (byteOrder == ByteOrder.BIG_ENDIAN) { return (short)
*** 245,255 **** public char readChar() throws IOException { return (char)readShort(); } public int readInt() throws IOException { ! if (read(byteBuf, 0, 4) < 0) { throw new EOFException(); } if (byteOrder == ByteOrder.BIG_ENDIAN) { return --- 245,255 ---- public char readChar() throws IOException { return (char)readShort(); } public int readInt() throws IOException { ! if (read(byteBuf, 0, 4) != 4) { throw new EOFException(); } if (byteOrder == ByteOrder.BIG_ENDIAN) { return