com.tuneology.avm.burner
Interface Burner

All Known Implementing Classes:
CdrdaoBurner, CdrecordBurner, HdiutilBurner

public interface Burner

Describes an API for writing CD-R data.

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

Field Summary
static int BLANK_ALL
          blank mode value
static int BLANK_FAST
          blank mode value
static int BLANK_FORCE
          blank mode bit
static int BLANK_SESSION
          blank mode value
static int BLANK_TRACK
          blank mode value
static int BLANK_TRTAIL
          blank mode value
static int BLANK_UNCLOSE
          blank mode value
static int BLANK_UNRESERVE
          blank mode value
static int DAO_MODE
          Burn mode.
static int DUMMY_MODE
          Burn mode.
static int ENABLE_MULTISESSION_BIT
          BurnFlags bits.
static int FIXATING
          Burn state.
static int PREPARING
          Burn state.
static int RAW_MODE
          Burn mode.
static int RAW16_MODE
          Burn mode.
static int RAW96P_MODE
          Burn mode.
static int RAW96R_MODE
          Burn mode.
static int READING
          Burn state.
static int STARTING
          Burn state.
static int SUPPORTS_AUDIO_TRACKS
           
static int SUPPORTS_CDPLUS_DISCS
           
static int SUPPORTS_CDTEXT
           
static int SUPPORTS_COPY
           
static int SUPPORTS_CUE_FILES
           
static int SUPPORTS_DAO_MODE
           
static int SUPPORTS_DATA_TRACK
           
static int SUPPORTS_ERASE
           
static int SUPPORTS_MULTISESSION
          Burner capabilities
static int SUPPORTS_TAO_MODE
           
static int TAO_MODE
          Burn mode.
static int WRITING_TRACKS
          Burn state.
 
Method Summary
 void burnSession(int speed, int mode, boolean multi, java.lang.String mcn, java.lang.String[] tracks, boolean[] types, DiscInfo info, java.io.File tempDir, ProgressListener pm)
          Burns a session to the media.
 void createCopy(CDDrive src, int speed, boolean onTheFly, ProgressListener pm)
          Create a disc that is a copy of the disc in the src drive.
 void erase(int mode)
          Erases the disc according to the desired mode.
 AtipInfo getAtipInfo()
          Returns the ATIP info from the CD-R(W) media.
 java.lang.String getMsinfo()
          Returns a string with the multisession info.
 

Field Detail

SUPPORTS_MULTISESSION

public static final int SUPPORTS_MULTISESSION
Burner capabilities

SUPPORTS_COPY

public static final int SUPPORTS_COPY

SUPPORTS_DATA_TRACK

public static final int SUPPORTS_DATA_TRACK

SUPPORTS_AUDIO_TRACKS

public static final int SUPPORTS_AUDIO_TRACKS

SUPPORTS_CDPLUS_DISCS

public static final int SUPPORTS_CDPLUS_DISCS

SUPPORTS_CDTEXT

public static final int SUPPORTS_CDTEXT

SUPPORTS_CUE_FILES

public static final int SUPPORTS_CUE_FILES

SUPPORTS_ERASE

public static final int SUPPORTS_ERASE

SUPPORTS_DAO_MODE

public static final int SUPPORTS_DAO_MODE

SUPPORTS_TAO_MODE

public static final int SUPPORTS_TAO_MODE

ENABLE_MULTISESSION_BIT

public static final int ENABLE_MULTISESSION_BIT
BurnFlags bits.

PREPARING

public static final int PREPARING
Burn state.

READING

public static final int READING
Burn state.

STARTING

public static final int STARTING
Burn state.

WRITING_TRACKS

public static final int WRITING_TRACKS
Burn state.

FIXATING

public static final int FIXATING
Burn state.

TAO_MODE

public static final int TAO_MODE
Burn mode.

DAO_MODE

public static final int DAO_MODE
Burn mode.

RAW_MODE

public static final int RAW_MODE
Burn mode.

RAW96R_MODE

public static final int RAW96R_MODE
Burn mode.

RAW16_MODE

public static final int RAW16_MODE
Burn mode.

RAW96P_MODE

public static final int RAW96P_MODE
Burn mode.

DUMMY_MODE

public static final int DUMMY_MODE
Burn mode.

BLANK_ALL

public static final int BLANK_ALL
blank mode value

BLANK_FAST

public static final int BLANK_FAST
blank mode value

BLANK_TRACK

public static final int BLANK_TRACK
blank mode value

BLANK_UNRESERVE

public static final int BLANK_UNRESERVE
blank mode value

BLANK_TRTAIL

public static final int BLANK_TRTAIL
blank mode value

BLANK_UNCLOSE

public static final int BLANK_UNCLOSE
blank mode value

BLANK_SESSION

public static final int BLANK_SESSION
blank mode value

BLANK_FORCE

public static final int BLANK_FORCE
blank mode bit
Method Detail

getAtipInfo

public AtipInfo getAtipInfo()
                     throws java.lang.Exception
Returns the ATIP info from the CD-R(W) media.
Returns:
the ATIP info from the CD-R(W) media.
Throws:
java.lang.Exception -  

getMsinfo

public java.lang.String getMsinfo()
                           throws java.lang.Exception
Returns a string with the multisession info. The string is formatted as ",". The first number is the sector number of the first sector in the last session of the disk that should be appended to. The second number is the starting sector number of the new session. This is the format produced by cdrecord, and the format expected by mkisofs.
Returns:
a string with the multisession info.
Throws:
java.lang.Exception -  

createCopy

public void createCopy(CDDrive src,
                       int speed,
                       boolean onTheFly,
                       ProgressListener pm)
                throws java.lang.Exception
Create a disc that is a copy of the disc in the src drive. If the source and destination are the same drive, the source disc will be ejected. The user is expected to insert a blank disc; when this is done, the program detects the presence of the blank disc and proceeds to write the copy to it.
Parameters:
src - the source drive
speed - the write speed for the copy
onTheFly - if true and possible, reads from source and simultaneously writes to destination. Note that if this is set, and there are recoverable read errors on the source drive, writing will fail unless the destination drive is equipped with Burn-Proof.
pm - receives callbacks for progress updates
Throws:
java.lang.Exception -  

burnSession

public void burnSession(int speed,
                        int mode,
                        boolean multi,
                        java.lang.String mcn,
                        java.lang.String[] tracks,
                        boolean[] types,
                        DiscInfo info,
                        java.io.File tempDir,
                        ProgressListener pm)
                 throws java.lang.Exception
Burns a session to the media.
Parameters:
speed - the speed at which to write the data.
mode - the write mode to use, one of TAO_MODE, DAO_MODE, RAW_MODE, RAW96R_MODE, RAW16_MODE, RAW96P_MODE. See the cdrecord documentation for details on which mode to use, depending on your application.
multi - if true, the end marker is not written so that more sessions can be added after this one.
mcn - The Media Control Number to write on the disc, or null if none is desired.
tracks - The files containing the data to be written to the tracks.
types - An array specifying the type of each track, true for data, false for audio. If null, it is assumed that all tracks are audio.
info - CD-TEXT info to be written to the disc, or null for none.
tempDir - where to write temp files.
pm - receives callbacks for progress updates.
Throws:
java.lang.Exception -  

erase

public void erase(int mode)
           throws java.lang.Exception
Erases the disc according to the desired mode.
Parameters:
mode - the erase mode, one of the BLANK_ constants, optionally or'ed with BLANK_FORCE.
Throws:
java.lang.Exception -