-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta2
-
generic
-
generic
Name: mlR10151 Date: 04/19/2001
According to the spec., the read(byte[],int,int) method in the javax.imageio.stream.ImageInputStreamImpl class:
"Reads one or more bytes from the stream, up to len, and stores them into b starting at index off.
The number of bytes read is returned. "
So, in case of an EOF it returns 0,
but the read(byte[]) method in the same class, which according to the spec just calls read(b, 0, b.length),
returns -1 to indicate an EOF.
Moreover, the spec. for the read(byte[],int,int) method of the FileImageOutputStream class,
which extends ImageInputStreamImpl, also says that it returns -1 in case of an EOF, and
therefore contradicts to the ImageInputStreamImpl description.
The same words apply to the FileImageInputStream class. The spec. for it's read(byte[],int,int) method
also says nothing about special behavior in case of an EOF.
======================================================================