com.tuneology.avm.burner
Class CdrdaoBurner

java.lang.Object
  |
  +--com.tuneology.avm.burner.ShellBurner
        |
        +--com.tuneology.avm.burner.CdrdaoBurner
All Implemented Interfaces:
Burner

public class CdrdaoBurner
extends ShellBurner
implements Burner

Implements writing CD-R data using the cdrdao program.

Version:
$Id: CdrdaoBurner.java,v 1.9 2003/05/30 07:21:02 xnarf Exp $
Author:
Fran Taylor

Fields inherited from class com.tuneology.avm.burner.ShellBurner
atipInfo, drive, maxMediaWriteSpeed, msInfo, pm, shellEncoding
 
Fields inherited from interface com.tuneology.avm.burner.Burner
BLANK_ALL, BLANK_FAST, BLANK_FORCE, BLANK_SESSION, BLANK_TRACK, BLANK_TRTAIL, BLANK_UNCLOSE, BLANK_UNRESERVE, DAO_MODE, DUMMY_MODE, ENABLE_MULTISESSION_BIT, FIXATING, PREPARING, RAW_MODE, RAW16_MODE, RAW96P_MODE, RAW96R_MODE, READING, STARTING, SUPPORTS_AUDIO_TRACKS, SUPPORTS_CDPLUS_DISCS, SUPPORTS_CDTEXT, SUPPORTS_COPY, SUPPORTS_CUE_FILES, SUPPORTS_DAO_MODE, SUPPORTS_DATA_TRACK, SUPPORTS_ERASE, SUPPORTS_MULTISESSION, SUPPORTS_TAO_MODE, TAO_MODE, WRITING_TRACKS
 
Constructor Summary
CdrdaoBurner(CDRDrive drive)
           
 
Method Summary
protected  void cleanupErase()
           
protected  void cleanupMsinfo()
           
protected  void cleanupSession(java.io.File tempDir)
           
 void erase(int mode)
          Erases the disc according to the desired mode.
protected  java.util.ArrayList getAtipCmd()
          Returns the command required to read the ATIP info from the disc.
static int getCapabilities()
           
protected  java.util.ArrayList getCopyCmd(CDDrive src, int speed, boolean onTheFly)
          Returns the command required to create a copy of the disc in the src drive.
static java.lang.String getDescription()
           
protected  java.util.ArrayList getEraseCmd(int mode)
          Returns the command required to erase the disc in the given mode.
protected  java.util.ArrayList getMsinfoCmd()
          Returns the command required to read the multisession info from the disc.
protected  java.util.ArrayList getSessionCmd(int speed, int mode, boolean multi, java.lang.String mcn, java.lang.String[] tracks, boolean[] types, DiscInfo info, java.io.File tempDir)
           
protected  java.util.ArrayList getStreamingCmd(int speed, int mode, boolean multi, java.lang.String mcn, boolean type, TocEntry cdText)
           
static java.lang.String getVersionString()
           
protected  boolean readAtipOutput(java.lang.String str)
          Called for each line of output from the program while reading the ATIP info from a disc.
protected  boolean readCopyOutput(java.lang.String str)
          Called for each line of output from the program while copying a disc.
protected  boolean readEraseOutput(java.lang.String str)
          Called for each line of output from the program while erasing a disc.
protected  boolean readMsinfoOutput(java.lang.String str)
          Called for each line of output from the program while reading the multisession info from a disc.
protected  boolean readSessionOutput(java.lang.String str)
          Called for each line of output from the program.
static void setCdrdaoCmd(java.lang.String str)
          Sets the pathname to the cdrdao executable.
 
Methods inherited from class com.tuneology.avm.burner.ShellBurner
burnSession, createCopy, getAtipInfo, getMsinfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tuneology.avm.burner.Burner
burnSession, createCopy, getAtipInfo, getMsinfo
 

Constructor Detail

CdrdaoBurner

public CdrdaoBurner(CDRDrive drive)
Parameters:
drive -  
Method Detail

getSessionCmd

protected java.util.ArrayList getSessionCmd(int speed,
                                            int mode,
                                            boolean multi,
                                            java.lang.String mcn,
                                            java.lang.String[] tracks,
                                            boolean[] types,
                                            DiscInfo info,
                                            java.io.File tempDir)
                                     throws java.io.IOException
Overrides:
getSessionCmd in class ShellBurner
Parameters:
speed -  
mode -  
multi -  
mcn -  
tracks -  
types -  
info -  
tempDir -  
Returns:
a list of strings representing the command.
Throws:
java.io.IOException -  

getStreamingCmd

protected java.util.ArrayList getStreamingCmd(int speed,
                                              int mode,
                                              boolean multi,
                                              java.lang.String mcn,
                                              boolean type,
                                              TocEntry cdText)
Overrides:
getStreamingCmd in class ShellBurner
Parameters:
speed -  
mode -  
multi -  
mcn -  
type -  
cdText -  
Returns:
a list of strings representing the command.

readSessionOutput

protected boolean readSessionOutput(java.lang.String str)
                             throws java.lang.Exception
Called for each line of output from the program.
Overrides:
readSessionOutput in class ShellBurner
Parameters:
str - the line of output.
Returns:
true if there is no error.
Throws:
java.lang.Exception -  

cleanupErase

protected void cleanupErase()
                     throws java.lang.Exception
Overrides:
cleanupErase in class ShellBurner
Throws:
java.lang.Exception -  

cleanupMsinfo

protected void cleanupMsinfo()
                      throws java.lang.Exception
Overrides:
cleanupMsinfo in class ShellBurner
Throws:
java.lang.Exception -  

cleanupSession

protected void cleanupSession(java.io.File tempDir)
                       throws java.lang.Exception
Overrides:
cleanupSession in class ShellBurner
Throws:
java.lang.Exception -  

erase

public void erase(int mode)
           throws java.lang.Exception
Description copied from interface: Burner
Erases the disc according to the desired mode.
Specified by:
erase in interface Burner
Overrides:
erase in class ShellBurner
Following copied from interface: com.tuneology.avm.burner.Burner
Parameters:
mode - the erase mode, one of the BLANK_ constants, optionally or'ed with BLANK_FORCE.
Throws:
java.lang.Exception -  

getCapabilities

public static int getCapabilities()

getEraseCmd

protected java.util.ArrayList getEraseCmd(int mode)
Description copied from class: ShellBurner
Returns the command required to erase the disc in the given mode.
Overrides:
getEraseCmd in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Parameters:
mode - the desired erase mode
Returns:
the list of strings to execute.

readEraseOutput

protected boolean readEraseOutput(java.lang.String str)
Description copied from class: ShellBurner
Called for each line of output from the program while erasing a disc.
Overrides:
readEraseOutput in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Parameters:
str - the line of output.
Returns:
true if there is no error.

getCopyCmd

protected java.util.ArrayList getCopyCmd(CDDrive src,
                                         int speed,
                                         boolean onTheFly)
Description copied from class: ShellBurner
Returns the command required to create a copy of the disc in the src drive.
Overrides:
getCopyCmd in class ShellBurner
Parameters:
src -  
speed -  
onTheFly -  

readCopyOutput

protected boolean readCopyOutput(java.lang.String str)
                          throws java.lang.Exception
Description copied from class: ShellBurner
Called for each line of output from the program while copying a disc.
Overrides:
readCopyOutput in class ShellBurner
Parameters:
str -  

getAtipCmd

protected java.util.ArrayList getAtipCmd()
Description copied from class: ShellBurner
Returns the command required to read the ATIP info from the disc.
Overrides:
getAtipCmd in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Returns:
the list of strings to execute.

readAtipOutput

protected boolean readAtipOutput(java.lang.String str)
Description copied from class: ShellBurner
Called for each line of output from the program while reading the ATIP info from a disc.
Overrides:
readAtipOutput in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Parameters:
str - the line of output.
Returns:
true if there is no error.

getMsinfoCmd

protected java.util.ArrayList getMsinfoCmd()
Description copied from class: ShellBurner
Returns the command required to read the multisession info from the disc.
Overrides:
getMsinfoCmd in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Returns:
the list of strings to execute.

readMsinfoOutput

protected boolean readMsinfoOutput(java.lang.String str)
Description copied from class: ShellBurner
Called for each line of output from the program while reading the multisession info from a disc.
Overrides:
readMsinfoOutput in class ShellBurner
Following copied from class: com.tuneology.avm.burner.ShellBurner
Parameters:
str - the line of output.
Returns:
true if there is no error.

getVersionString

public static java.lang.String getVersionString()

setCdrdaoCmd

public static void setCdrdaoCmd(java.lang.String str)
                         throws java.lang.Exception
Sets the pathname to the cdrdao executable.
Parameters:
str - the pathname to the cdrdao executabls.

getDescription

public static java.lang.String getDescription()