-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
7u76
-
x86
-
windows_8
FULL PRODUCT VERSION :
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Tested it in windows 7, 8, 8.1.
A DESCRIPTION OF THE PROBLEM :
trying to convert *.wav audio file to specific *.wav file.
try (AudioInputStream sias = AudioSystem.getAudioInputStream(mediaFileToConvert)) {
AudioFormat newFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000f, 16, 1, 2, 8000f, false);
AudioInputStream convert1AIS = AudioSystem.getAudioInputStream(newFormat, sias);
AudioSystem.write(convert1AIS, AudioFileFormat.Type.WAVE, saveConvertedFilelocalDest);
convert1AIS.close();
}
while trying to delete mediaFileToConvert giving no error but not deleting file. even unable to delete manually
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
System.gc();
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Tested it in windows 7, 8, 8.1.
A DESCRIPTION OF THE PROBLEM :
trying to convert *.wav audio file to specific *.wav file.
try (AudioInputStream sias = AudioSystem.getAudioInputStream(mediaFileToConvert)) {
AudioFormat newFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000f, 16, 1, 2, 8000f, false);
AudioInputStream convert1AIS = AudioSystem.getAudioInputStream(newFormat, sias);
AudioSystem.write(convert1AIS, AudioFileFormat.Type.WAVE, saveConvertedFilelocalDest);
convert1AIS.close();
}
while trying to delete mediaFileToConvert giving no error but not deleting file. even unable to delete manually
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
System.gc();
- duplicates
-
JDK-8013586 audioInputStream.close() does not release the resource
-
- Resolved
-