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.

Which value should I use for the length of the file in AudioOutputStreams if the length is not known in advance?

file known LENGTH value
0
Posted

Which value should I use for the length of the file in AudioOutputStreams if the length is not known in advance?

0

If the length of the file is not known in advance, you should use the value AudioSystem.NOT_SPECIFIED. Pass this value to the constructors of AudioOutputStream subclasses directly or use it in requesting an AudioOutputStream instance via AudioSystemShadow.getAudioOutputStream(). Note that not knowing the length makes it impossible to use OutputStreams as target for some audio file types (File targets should work always).

Related Questions

What is your question?

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

Experts123