com.tuneology.avm.burner
Class HdiutilBurner

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

public class HdiutilBurner
extends ShellBurner
implements Burner

Implements writing CD-R data using the hdiutil program (OSX only).

Version:
$Id: HdiutilBurner.java,v 1.3 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
HdiutilBurner(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)
          Generates the shell command used to write a session on the disc.
protected  java.util.ArrayList getStreamingCmd(int speed, int mode, boolean multi, java.lang.String mcn, boolean type, TocEntry cdText)
          Generates the shell command for writing a data stream to a session on the disc.
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 while writing a session.
 
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

HdiutilBurner

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

getStreamingCmd

protected java.util.ArrayList getStreamingCmd(int speed,
                                              int mode,
                                              boolean multi,
                                              java.lang.String mcn,
                                              boolean type,
                                              TocEntry cdText)
                                       throws java.lang.Exception
Generates the shell command for writing a data stream to a session on the disc. Not yet implemented.
Overrides:
getStreamingCmd in class ShellBurner
Parameters:
speed -  
mode -  
multi -  
mcn -  
type -  
cdText -  
Returns:
the command to run.
Throws:
java.io.IOException -  

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.lang.Exception
Generates the shell command used to write a session on the disc. Writes temporary files for cdrecord that are deleted afterward.
Overrides:
getSessionCmd in class ShellBurner
Parameters:
speed -  
mode -  
multi -  
mcn -  
tracks -  
types -  
info -  
Returns:
the command to run.
Throws:
java.lang.Exception -  

readSessionOutput

protected boolean readSessionOutput(java.lang.String str)
Description copied from class: ShellBurner
Called for each line of output from the program while writing a session.
Overrides:
readSessionOutput 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.
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 -  

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 -  

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.

getCopyCmd

protected java.util.ArrayList getCopyCmd(CDDrive src,
                                         int speed,
                                         boolean onTheFly)
                                  throws java.lang.Exception
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
Following copied from class: com.tuneology.avm.burner.ShellBurner
Returns:
the list of strings to execute.
Throws:
java.lang.Exception -  

readCopyOutput

protected boolean readCopyOutput(java.lang.String str)
Description copied from class: ShellBurner
Called for each line of output from the program while copying a disc.
Overrides:
readCopyOutput 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.

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.

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 -  

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.

getCapabilities

public static int getCapabilities()

getVersionString

public static java.lang.String getVersionString()

getDescription

public static java.lang.String getDescription()