Java Stream Close closeDataLine(final SourceDataLine line, final AudioInputStream ais)

Here you can find the source of closeDataLine(final SourceDataLine line, final AudioInputStream ais)

Description

close Data Line

License

Open Source License

Declaration

public static void closeDataLine(final SourceDataLine line, final AudioInputStream ais) throws IOException 

Method Source Code


//package com.java2s;
import java.io.IOException;
import javax.sound.sampled.*;

public class Main {
    public static void closeDataLine(final SourceDataLine line, final AudioInputStream ais) throws IOException {
        line.drain();// w  ww  . j a  v a2 s .  c  om
        line.stop();
        line.close();
        ais.close();
    }
}

Related

  1. closeAndRethrow(final Exception e, final Closeable... channels)
  2. closeBufferedFile(BufferedReader reader)
  3. closeBufferedReader(BufferedReader bufferedReader)
  4. closeCloseableIfNotNull(Closeable fileWriter)
  5. closeConnection(Closeable... closes)
  6. closeDebugFile()
  7. closeEL(InputStream is)
  8. closeEntry(ZipOutputStream... outputStreams)
  9. closeFile()