[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/24596] Return value of getResourceAsStream().available()
From: |
freebeans at xqb dot biglobe dot ne dot jp |
Subject: |
[Bug classpath/24596] Return value of getResourceAsStream().available() in jar file |
Date: |
3 Nov 2005 06:11:04 -0000 |
------- Comment #4 from freebeans at xqb dot biglobe dot ne dot jp 2005-11-03
06:11 -------
I compared operation with Sun JDK1.5 and GNU Classpath about InputStream which
ZipFile.getInputStream (ZipEntry) returns.
In the case of the compressed ZIP file
Sun JDK1.5: Return the value which subtracted the number of read bytes from
original file size.
GNU Classpath 0.18: When EOF is reached, return 0. 1 is returned when other.
In the case of a non-compressed ZIP file
Sun JDK1.5: Return the value which subtracted the number of read bytes from
file size.
GNU Classpath 0.18: Return the same value as Sun JDK1.5.
This is not the bug of GNU Classpath.
A problem is in the application depending on InputStream.available().
However, since many of such applications exist, I consider that it is better to
return the same value as Sun.
The sauce depending on available() is introduced also to the following reports
of JavaWorld as a sample.
To jar or not to jar?
Get the lowdown on using Java Archive (jar) files -- including pros and cons
http://www.javaworld.com/javaworld/jw-07-1998/jw-07-jar_p.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24596
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/24596] Return value of getResourceAsStream().available() in jar file,
freebeans at xqb dot biglobe dot ne dot jp <=