Returns converted AudioInputStream.

@param audioInputStream
@return
331141
@Override
    public AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream audioInputStream) {
        if (isConversionSupported(targetFormat, audioInputStream.getFormat())) {
            return new DecodedVorbisAudioInputStream(targetFormat, audioInputStream);
        } else {
            throw new IllegalArgumentException("conversion not supported");
        }
    }
1135194
private static String convertStreamToString(InputStream inputStream)
        throws IOException {
        if (inputStream == null) {
            return "";
        } else {
            StringBuilder stringBuilder = new StringBuilder();
            String line;
            try {
                BufferedReader reader =
                    new BufferedReader(new InputStreamReader(inputStream,
                                                             StringUtils.UTF8));
                while ((line = reader.readLine()) != null) {
                    stringBuilder.append(line);
                }
            } finally {
                inputStream.close();
            }
            return stringBuilder.toString();
        }
    }
342769
InputStream getInputStream() {
    InputStream result = (InputStream) streams.get();
    return ((result == null) ? defaultInputStream : result);
  }
1017394
@Override
    public InputStream getInputStream() throws IOException {
	if (barr == null) {
	    barr = IOUtil.toBytes(url.openStream());
	}
	return new ByteArrayInputStream(barr);
    }
779869
private InputStream asInputStream() {
        InputStream inputStream = classLoader.getResourceAsStream(path);
        if (inputStream == null) {
            throw new RuntimeException("File '" + path + "' was not found.");
        }
        return inputStream;
    }
1280622
public Audio getAIF(String ref) throws IOException {
		return getAIF(ref, ResourceLoader.getResourceAsStream(ref));
	}
543317
@Override
    public InputStream openInputStream() throws IOException {
        if (outputStream != null) {
            return new ByteArrayInputStream(outputStream.toByteArray());
        } else {
            return new ByteArrayInputStream(new byte[0]);
        }
    }
964205
@SuppressWarnings("resource")
    private static SourceDataLine getDataLine(AudioInputStream input) throws IOException
    {
        final AudioFormat format = input.getFormat();
        try
        {
            final SourceDataLine dataLine;
            if (WavFormat.mixer != null)
            {
                dataLine = AudioSystem.getSourceDataLine(format, WavFormat.mixer);
            }
            else
            {
                dataLine = AudioSystem.getSourceDataLine(format);
            }
            dataLine.open(format);

            return dataLine;
        }
        catch (final LineUnavailableException exception)
        {
            throw new IOException(exception);
        }
    }
1008836
private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data) {
		ByteBuffer dest = ByteBuffer.allocateDirect(audio_bytes.length);
		dest.order(ByteOrder.nativeOrder());
		ByteBuffer src = ByteBuffer.wrap(audio_bytes);
		src.order(ByteOrder.LITTLE_ENDIAN);
		if (two_bytes_data) {
			ShortBuffer dest_short = dest.asShortBuffer();
			ShortBuffer src_short = src.asShortBuffer();
			while (src_short.hasRemaining())
				dest_short.put(src_short.get());
		} else {
			while (src.hasRemaining())
				dest.put(src.get());
		}
		dest.rewind();
		return dest;
	}
449553
private static String inputStreamToString(InputStream in, String encoding) throws IOException {

        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
        byte[] data = new byte[BUFFER_SIZE];
        int count = -1;
        while ((count = in.read(data, 0, BUFFER_SIZE)) != -1) {
            outStream.write(data, 0, count);
        }
        return new String(outStream.toByteArray(), encoding);
    }
518910
public Audio getWAV(String ref) throws IOException {
		return getWAV(ref, ResourceLoader.getResourceAsStream(ref));
	}
872466
public InputStream getInputStream() throws IOException {
        if (cachedContent == null) {
            cachedContent = mos.getData();
        }
        return new ByteArrayInputStream(cachedContent);
    }
259392
public static String inputStreamToString(InputStream in) {
        StringBuffer buffer = new StringBuffer();
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(in,
                    "UTF-8"), 1024);
            String line;
            while ((line = br.readLine()) != null) {
                buffer.append(line);
            }
        } catch (IOException iox) {
            LOGR.warning(iox.getMessage());
        }
        return buffer.toString();
    }
80023
@Override
    public AudioFileFormat getAudioFileFormat(URL url) throws UnsupportedAudioFileException, IOException {
        LOG.log(Level.FINE, "getAudioFileFormat(URL url)");
        InputStream inputStream = url.openStream();
        try {
            return getAudioFileFormat(inputStream);
        } finally {
            if (inputStream != null) {
                inputStream.close();
            }
        }
    }
544025
public InputStream getInputStream()
    {
        InputStream stream=null;
        try
        {
            stream=this.commPort.getInputStream();
        }
        catch(IOException exception)
        {
            throw new FaxException("Unable to extract input stream.",exception);
        }
        
        return stream;
    }
1362284
@Override
    public AudioInputStream getAudioInputStream(URL url) throws UnsupportedAudioFileException, IOException {
        LOG.log(Level.FINE, "getAudioInputStream(URL url)");
        InputStream inputStream = url.openStream();
        try {
            return getAudioInputStream(inputStream);
        } catch (UnsupportedAudioFileException | IOException e) {
            if (inputStream != null) {
                inputStream.close();
            }
            throw e;
        }
    }
681330
public static AiffData create(InputStream is) {
		try {
			return create(
				AudioSystem.getAudioInputStream(is));
		} catch (Exception e) {
			org.lwjgl.LWJGLUtil.log("Unable to create from inputstream");
			e.printStackTrace();
			return null;
		}		
	}