ObjectInputStream reads an array

I am trying to read in an array from an ObjectInputStream in Java. I can not find documentation on how to do this. I assume this is readObject (), but this does not work.

out.write(Object) out.write(Object) out.write(boolean[]) 

... to the servlet ...

 Object one = in.readObject(); Object two = in.readObject(); boolean[] thr = (boolean[])in.readObject(); 

Is this the right one, or am I doing it the wrong way? If he corrects then any ideas on why this might not please?

+4
source share
1 answer

Your reading code is correct. Your spelling pseudo-code is also correct if you assume that it is indeed a pseudo-code and that you are actually calling these methods with arguments of these types in that order.

+4
source

All Articles