available() vraci neco jineho nez length(), viz javadoc:

available():

Returns the number of bytes that can be read (or skipped over) from this
input stream without blocking by the next caller of a method for this input
stream. The next caller might be the same thread or or another thread.

length():

Returns the length of the file denoted by this abstract pathname. The return
value is unspecified if this pathname denotes a directory.


  Lukas


On Tue, Sep 16, 2008 at 10:21 AM, Lukáš Zapletal <[EMAIL PROTECTED]>wrote:

> Zdravim konferenci,
>
> metoda length() tridy File vraci long, ale metoda available() tridy
> InputStream int. Je zde jisty typovy rozpor. Chtel jsem kouknout, jak
> je implementovana metoda available() tridy FileInputStream, ale je to
> nativni metoda.
>
> Nevi nekdo, jak se Java od Sunu chova pri cteni velikeho souboru,
> ktery presahne rozsah typu int? Co vraci metoda available tridy
> FileInputStream?
>
> LZ
>
> --
> Lukas Zapletal
> http://lukas.zapletalovi.com
>

Odpovedet emailem