/** * Create an AudioDestination to which the audio data can be written. * * @param isInRam * whether to hold the data in RAM or write it into a file. The calling code is responsible for administering this * AudioDestination. * @throws IOException * if the underlying OutputStream could not be created. */ public AudioDestination(boolean isInRam) throws IOException { this.ram = isInRam; if (ram) { os = new ByteArrayOutputStream(); f = null; } else { f = MaryUtils.createSelfDeletingTempFile(3600); os = new FileOutputStream(f); } }
/** * Create an AudioDestination to which the audio data can be written. * * @param isInRam * whether to hold the data in RAM or write it into a file. The calling code is responsible for administering this * AudioDestination. * @throws IOException * if the underlying OutputStream could not be created. */ public AudioDestination(boolean isInRam) throws IOException { this.ram = isInRam; if (ram) { os = new ByteArrayOutputStream(); f = null; } else { f = MaryUtils.createSelfDeletingTempFile(3600); os = new FileOutputStream(f); } }