1

I am creating a client/server RMI application and need to search for images on the server database and return to the client multiple images.

I immediately thought to do this ArrayList<Byte []>arrayBytes = new ArrayList <Byte []>(); and return arrayBytes, I soon found that it is impossible.

Researched ByteArrayOutputStream but I do not think the support for what I'm trying to do ...

What alternative have for this?

aioobe
  • 413,195
  • 112
  • 811
  • 826
Eduardo
  • 97
  • 1
  • 9

1 Answers1

1

You're probably after ArrayList<byte[]>. (You don't need to use Byte as component type for the array. byte[] is an Object.)

You can't do new ArrayList<byte>[]. Perhaps that's what confused you.

aioobe
  • 413,195
  • 112
  • 811
  • 826