This is not just an RMI / FTP problem. People have got in trouble with
`InputStream.available()'
when loading GIF images in Applets.
Instead use a `ByteArrayOutputStream' to read the data, buffer size by buffer
size
then get the data by calling `getBytes()'.
[EMAIL PROTECTED] wrote:
> Robert Covell wrote:
> >
> > System.out.println("Getting file: " + loc);
> > try
> > {
> > DataInputStream di = new DataInputStream(new
> > FileInputStream(new File(loc)));
> > int avail = di.available();
> i think it must return 0, ^^^^^^^^^^^^^^^^^^^^ (if it actually not
> overloaded)
> > System.out.println("Available: " + avail);
> > byte[] data = new byte[avail];
>
> Cheers.
> --
> Alexander Davydenko |
> [EMAIL PROTECTED], [EMAIL PROTECTED] | Moscow, USSR
Peter
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]