javazoom.jl.converter

Class Converter


public class Converter
extends java.lang.Object

The Converter class implements the conversion of an MPEG audio file to a .WAV file. To convert an MPEG audio stream, just create an instance of this class and call the convert() method, passing in the names of the input and output files. You can pass in optional ProgressListener and Decoder.Params objects also to customize the conversion.
Since:
0.0.7

Nested Class Summary

static class
Converter.PrintWriterProgressListener
Implementation of ProgressListener that writes notification text to a PrintWriter.
static interface
Converter.ProgressListener
This interface is used by the Converter to provide notification of tasks being carried out by the converter, and to provide new information as it becomes available.

Constructor Summary

Converter()
Creates a new converter instance.

Method Summary

void
convert(InputStream sourceStream, String destName, Converter.ProgressListener progressListener, Decoder.Params decoderParams)
void
convert(String sourceName, String destName)
void
convert(String sourceName, String destName, Converter.ProgressListener progressListener)
void
convert(String sourceName, String destName, Converter.ProgressListener progressListener, Decoder.Params decoderParams)
protected int
countFrames(InputStream in)
protected InputStream
openInput(String fileName)

Constructor Details

Converter

public Converter()
Creates a new converter instance.

Method Details

convert

public void convert(InputStream sourceStream,
                    String destName,
                    Converter.ProgressListener progressListener,
                    Decoder.Params decoderParams)
            throws JavaLayerException

convert

public void convert(String sourceName,
                    String destName)
            throws JavaLayerException

convert

public void convert(String sourceName,
                    String destName,
                    Converter.ProgressListener progressListener)
            throws JavaLayerException

convert

public void convert(String sourceName,
                    String destName,
                    Converter.ProgressListener progressListener,
                    Decoder.Params decoderParams)
            throws JavaLayerException

countFrames

protected int countFrames(InputStream in)

openInput

protected InputStream openInput(String fileName)
            throws IOException

JavaZOOM 1999-2005