< prev index next >

test/javax/sound/sampled/AudioInputStream/FrameLengthAfterConversion.java

Print this page

        

*** 24,33 **** --- 24,35 ---- import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; + import java.nio.file.Files; + import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import javax.sound.sampled.AudioFileFormat; import javax.sound.sampled.AudioFormat;
*** 160,170 **** temp.deleteOnExit(); afw.write(ais, type, temp); ais = AudioSystem.getAudioInputStream(temp); final long frameLength = ais.getFrameLength(); ais.close(); ! temp.delete(); validate(frameLength); } catch (IllegalArgumentException | UnsupportedAudioFileException | IOException ignored) { } } --- 162,172 ---- temp.deleteOnExit(); afw.write(ais, type, temp); ais = AudioSystem.getAudioInputStream(temp); final long frameLength = ais.getFrameLength(); ais.close(); ! Files.delete(Paths.get(temp.getAbsolutePath())); validate(frameLength); } catch (IllegalArgumentException | UnsupportedAudioFileException | IOException ignored) { } }
< prev index next >