[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: |
31 Oct 2005 23:38:43 -0000 |
------- Comment #3 from freebeans at xqb dot biglobe dot ne dot jp 2005-10-31
23:38 -------
(In reply to comment #2)
> Interesting. This comes from ZipInputStream.available() which according
> to JCL 2e v1 is specified as: "returns 0 if this ZipInputStream has been
> closed; otherwise, it returns 1. Unlike the conventional definition of
> available(), this method does NOT return the actual number of bytes that
> could be read without blocking."
It seems that Sun's implementation does not return ZipInputStream.
ins.getClass().getName() returns "java.util.zip.ZipFile$2"
ins is subclass of ZipInputStream returns false.
JDK version is:
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
> Is this always, or only for (un)compressed jar entries?
Because I am trying only with compressed jar file yet, I don't know about that.
> What are the number you expect with the example you posted?
The expected return value is a number of bytes of oritinal resource size
(uncompressed size).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24596