Package javazoom.jl.converter
Class Converter.PrintWriterProgressListener
java.lang.Object
javazoom.jl.converter.Converter.PrintWriterProgressListener
- All Implemented Interfaces:
Converter.ProgressListener
- Enclosing class:
Converter
public static class Converter.PrintWriterProgressListener
extends Object
implements Converter.ProgressListener
Implementation of
ProgressListener
that writes
notification text to a PrintWriter
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Debug detail.static final int
Level of detail typically expected of expert users.static final int
static final int
static final int
Verbose detail.Fields inherited from interface javazoom.jl.converter.Converter.ProgressListener
UPDATE_CONVERT_COMPLETE, UPDATE_FRAME_COUNT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Called when an exception is thrown during while converting a frame.void
converterUpdate
(int updateID, int param1, int param2) Notifies the listener that new information is available.void
decodedFrame
(int frameNo, Header header, Obuffer o) This method is called after a frame has been decoded.boolean
isDetail
(int detail) newStdOut
(int detail) void
parsedFrame
(int frameNo, Header header) If the converter wishes to make a first pass over the audio frames, this is called as each frame is parsed.void
This method is called after each frame has been read, but before it has been decoded.
-
Field Details
-
NO_DETAIL
public static final int NO_DETAIL- See Also:
-
EXPERT_DETAIL
public static final int EXPERT_DETAILLevel of detail typically expected of expert users.- See Also:
-
VERBOSE_DETAIL
public static final int VERBOSE_DETAILVerbose detail.- See Also:
-
DEBUG_DETAIL
public static final int DEBUG_DETAILDebug detail. All frame read notifications are shown.- See Also:
-
MAX_DETAIL
public static final int MAX_DETAIL- See Also:
-
-
Constructor Details
-
PrintWriterProgressListener
-
-
Method Details
-
newStdOut
-
isDetail
public boolean isDetail(int detail) -
converterUpdate
public void converterUpdate(int updateID, int param1, int param2) Description copied from interface:Converter.ProgressListener
Notifies the listener that new information is available.- Specified by:
converterUpdate
in interfaceConverter.ProgressListener
- Parameters:
updateID
- Code indicating the information that has been updated.param1
- Parameter whose value depends upon the update code.param2
- Parameter whose value depends upon the update code. TheupdateID
parameter can take these values: UPDATE_FRAME_COUNT: param1 is the frame count, or -1 if not known. UPDATE_CONVERT_COMPLETE: param1 is the conversion time, param2 is the number of frames converted.
-
parsedFrame
Description copied from interface:Converter.ProgressListener
If the converter wishes to make a first pass over the audio frames, this is called as each frame is parsed.- Specified by:
parsedFrame
in interfaceConverter.ProgressListener
-
readFrame
Description copied from interface:Converter.ProgressListener
This method is called after each frame has been read, but before it has been decoded.- Specified by:
readFrame
in interfaceConverter.ProgressListener
- Parameters:
frameNo
- The 0-based sequence number of the frame.header
- The Header rerpesenting the frame just read.
-
decodedFrame
Description copied from interface:Converter.ProgressListener
This method is called after a frame has been decoded.- Specified by:
decodedFrame
in interfaceConverter.ProgressListener
- Parameters:
frameNo
- The 0-based sequence number of the frame.header
- The Header rerpesenting the frame just read.o
- The Obuffer the deocded data was written to.
-
converterException
Description copied from interface:Converter.ProgressListener
Called when an exception is thrown during while converting a frame.- Specified by:
converterException
in interfaceConverter.ProgressListener
- Parameters:
t
- TheThrowable
instance that was thrown.- Returns:
true
to continue processing, or false to abort conversion. If this method returnsfalse
, the exception is propagated to the caller of the convert() method. Iftrue
is returned, the exception is silently ignored and the converter moves onto the next frame.
-