Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.io.IOException: mark/reset not supporte

843802Sep 10 2009 — edited Sep 16 2009
I've got this exception when I tryed to play some *.wav file:
java.io.IOException: mark/reset not supported
	at java.io.InputStream.reset(InputStream.java:331)
	at java.io.FilterInputStream.reset(FilterInputStream.java:204)
	at com.sun.media.sound.AiffFileReader.getCOMM(AiffFileReader.java:250)
	at com.sun.media.sound.AiffFileReader.getAudioInputStream(AiffFileReader.java:165)
	at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1094)
	at com.mymegaproject.app.gui.sound.SoundPlayback.run(SoundPlayback.java:467)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
The way which I used to is in the code below.
	try
	{
		final FileInputStream fis = new FileInputStream(waveFile);
		final AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(fis);
		play(audioInputStream);
	}
	catch(final Exception e)
	{
		Log.logException(e);
	}
private void play(final AudioInputStream audioInputStream)
	{
         ...
		closeClip();
		clip = (Clip)AudioSystem.getLine(clipInfo);
	        clip.open(audioInputStream);
		clip.start();
		clip.drain();
         ...
	}
I'm not strong enough in sound formats and codecs.
Does anybody has run into this problem or maybe know where is the problem?

Edited by: xCh3Dx on Sep 10, 2009 5:05 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 14 2009
Added on Sep 10 2009
6 comments
2,646 views