Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why are the Java Sound classes not serializable?

0
Posted

Why are the Java Sound classes not serializable?

0

There has been some discussion about making classes like AudioFormat serializable. But defining and implementing a serializable form for the data, keeping in mind that there may be subclasses, would be a lot of work and introduce implementation restrictions. Compared to that, the use cases for serializable Java Sound classes was considered too weak. For other types of classes like SourceDataLine, TargetDataLine and AudioInputStream, serialization doesn’t make sense at all: since a Line does not represent static data, but rather data is “flowing” through it, it’s impossible to restore a useful state.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123