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 java.lang.Object implements Converter.ProgressListener
Implementation ofProgressListenerthat writes notification text to aPrintWriter.
-
-
Field Summary
Fields Modifier and Type Field Description static intDEBUG_DETAILDebug detail.static intEXPERT_DETAILLevel of detail typically expected of expert users.static intMAX_DETAILstatic intNO_DETAILstatic intVERBOSE_DETAILVerbose detail.-
Fields inherited from interface javazoom.jl.converter.Converter.ProgressListener
UPDATE_CONVERT_COMPLETE, UPDATE_FRAME_COUNT
-
-
Constructor Summary
Constructors Constructor Description PrintWriterProgressListener(java.io.PrintWriter writer, int detailLevel)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconverterException(java.lang.Throwable t)Called when an exception is thrown during while converting a frame.voidconverterUpdate(int updateID, int param1, int param2)Notifies the listener that new information is available.voiddecodedFrame(int frameNo, Header header, Obuffer o)This method is called after a frame has been decoded.booleanisDetail(int detail)static Converter.PrintWriterProgressListenernewStdOut(int detail)voidparsedFrame(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.voidreadFrame(int frameNo, Header header)This method is called after each frame has been read, but before it has been decoded.
-
-
-
Field Detail
-
NO_DETAIL
public static final int NO_DETAIL
- See Also:
- Constant Field Values
-
EXPERT_DETAIL
public static final int EXPERT_DETAIL
Level of detail typically expected of expert users.- See Also:
- Constant Field Values
-
VERBOSE_DETAIL
public static final int VERBOSE_DETAIL
Verbose detail.- See Also:
- Constant Field Values
-
DEBUG_DETAIL
public static final int DEBUG_DETAIL
Debug detail. All frame read notifications are shown.- See Also:
- Constant Field Values
-
MAX_DETAIL
public static final int MAX_DETAIL
- See Also:
- Constant Field Values
-
-
Method Detail
-
newStdOut
public static Converter.PrintWriterProgressListener newStdOut(int detail)
-
isDetail
public boolean isDetail(int detail)
-
converterUpdate
public void converterUpdate(int updateID, int param1, int param2)Description copied from interface:Converter.ProgressListenerNotifies the listener that new information is available.- Specified by:
converterUpdatein 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. TheupdateIDparameter 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
public void parsedFrame(int frameNo, Header header)Description copied from interface:Converter.ProgressListenerIf the converter wishes to make a first pass over the audio frames, this is called as each frame is parsed.- Specified by:
parsedFramein interfaceConverter.ProgressListener
-
readFrame
public void readFrame(int frameNo, Header header)Description copied from interface:Converter.ProgressListenerThis method is called after each frame has been read, but before it has been decoded.- Specified by:
readFramein interfaceConverter.ProgressListener- Parameters:
frameNo- The 0-based sequence number of the frame.header- The Header rerpesenting the frame just read.
-
decodedFrame
public void decodedFrame(int frameNo, Header header, Obuffer o)Description copied from interface:Converter.ProgressListenerThis method is called after a frame has been decoded.- Specified by:
decodedFramein 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
public boolean converterException(java.lang.Throwable t)
Description copied from interface:Converter.ProgressListenerCalled when an exception is thrown during while converting a frame.- Specified by:
converterExceptionin interfaceConverter.ProgressListener- Parameters:
t- TheThrowableinstance that was thrown.- Returns:
trueto continue processing, or false to abort conversion. If this method returnsfalse, the exception is propagated to the caller of the convert() method. Iftrueis returned, the exception is silently ignored and the converter moves onto the next frame.
-
-