0

In our project we are using the org.apache.mina.core.buffer.IoBuffer to serialize and deserialize objects and send it through the network. There is one more requirement to send Optional values over the same. Optional<> being a non serializable entity I am not able to do so. Is there a workaround to fix this issue?

  • or can we cast Optional to some other type may be "byte" or something? this could help me as well. – Ravi Bodla Feb 23 '22 at 08:52
  • Does this answer your question? [Why java.util.Optional is not Serializable, how to serialize the object with such fields](https://stackoverflow.com/questions/24547673/why-java-util-optional-is-not-serializable-how-to-serialize-the-object-with-suc) – pringi Feb 23 '22 at 12:44

0 Answers0