• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

InputStream to RandomAccessFile..best way?

Darrin Smith
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert from an InputStream to a RandomAccessFile. The reason for this can be found in the thread which prompted this question. That thread can be found here:


The file to be read (which is a compressed image file of type .cg) will be read by a servlet. This will pass back to an applet.

Anyway, what I am doing now is using a temporary file on the applet side. The code looks like this:

I've use this same servlet many times and it works just fine (nice and fast) so I'm pretty certain that is OK, but the applet and conversion parts sure are slow!

I mean 10 to 15 minutes to load under 1 meg of data across a local network!

So, can anyone see what I am doing wrong?

Is there a fast way to create a RandomAccessFile from an InputStream?

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic