Forums Register Login

ObjectInputStream

+Pie Number of slices to send: Send
How can we check if an ObjectInputStream is ready to be read. It does not have methods like ready() as in readers, so how do I check it.
+Pie Number of slices to send: Send
Have a look at the ObjectInputStream API Doc and you'll see a method called available() that may do what you require.
+Pie Number of slices to send: Send
I tried available but it blocks indefinitely(while(!(available>0)){}) When I remove it, the program moves forward and reads from the objectstream.
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 630 times.
Similar Threads
Object Serialization
Wanted to pack values in java like struct.pack() in python
Serialization
Objectinputstreams into arrays
reseting an objectinputstream
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 22:49:21.