com.rocketdivision.jstarburn
Class JStarBurnBurnerGrabber

java.lang.Object
  extended bycom.rocketdivision.jstarburn.JStarBurnBurnerGrabber

public class JStarBurnBurnerGrabber
extends java.lang.Object

Burning, mastering and grabbing functionality

Since:
2006-05-23
Version:
1.0
Author:
Sergey Zavadski

Field Summary
static intCD_SPEED_IN_KBPS_10X
          8X CD speed constant
static intCD_SPEED_IN_KBPS_12X
          12X CD speed constant
static intCD_SPEED_IN_KBPS_1X
          1X CD speed constant
static intCD_SPEED_IN_KBPS_20X
          20X CD speed constant
static intCD_SPEED_IN_KBPS_24X
          24X CD speed constant
static intCD_SPEED_IN_KBPS_2P2X
          2.2X CD speed constant
static intCD_SPEED_IN_KBPS_2X
          2X CD speed constant
static intCD_SPEED_IN_KBPS_3X
          3X CD speed constant
static intCD_SPEED_IN_KBPS_40X
          40X CD speed constant
static intCD_SPEED_IN_KBPS_44X
          44X CD speed constant
static intCD_SPEED_IN_KBPS_48X
          48X CD speed constant
static intCD_SPEED_IN_KBPS_4X
          4X CD speed constant
static intCD_SPEED_IN_KBPS_52X
          52X CD speed constant
static intCD_SPEED_IN_KBPS_6X
          6X CD speed constant
static intCD_SPEED_IN_KBPS_8X
          6X CD speed constant
static intDVD_SPEED_IN_KBPS_12X
          12X DVD speed constant (DVD-R, DVD+R)
static intDVD_SPEED_IN_KBPS_16X
          16X DVD speed constant (DVD+R)
static intDVD_SPEED_IN_KBPS_1X
          1X DVD speed constant (DVD-R, DVD-RW and DVD-RAM)
static intDVD_SPEED_IN_KBPS_2DOT4X
          2.4X DVD speed constant (DVD+R, DVD+R DL and DVD+RW)
static intDVD_SPEED_IN_KBPS_2X
          2X DVD speed constant (DVD-R, DVD-RW and DVD-RAM)
static intDVD_SPEED_IN_KBPS_3X
          3X DVD speed constant (DVD-RAM)
static intDVD_SPEED_IN_KBPS_4X
          4X DVD speed constant (DVD-R, DVD-R DL, DVD-RW, DVD+R, DVD+R DL, DVD+RW and DVD-RAM)
static intDVD_SPEED_IN_KBPS_5X
          5X DVD speed constant (DVD-RAM)
static intDVD_SPEED_IN_KBPS_6X
          6X DVD speed constant (DVD-RW)
static intDVD_SPEED_IN_KBPS_8X
          8X DVD speed constant (DVD-R, DVD-R DL, DVD+R, DVD+R DL and DVD+RW)
static intERASE_TYPE_FAST
          Fast erase (only TOC erased)
static intERASE_TYPE_FULL
          Full erase
static intERROR_ACCESS_TO_FEATURE_DENIED
          Access to feature denied b/s of the wrong version
static intERROR_BUFFER_TOO_SMALL
          Buffer size supplied by caller is not sufficient
static intERROR_BUFFER_UNDERRUN
          Buffer underrun happened
static intERROR_DEVICE_SHARING_VIOLATION
          Device failed to open b/s of sharing violation
static intERROR_DPM_FAILED
          DPM associated call failed
static intERROR_ERROR_RECOVERY_FAILED
          Error recovery failed
static intERROR_FAILURE
          Undefined error happened, something goes really wrong
static intERROR_FILE_TOO_BIG
          File is too big for the requested operation
static intERROR_FULL_ERASE_REQUIRED
          Full erase required before recording to inserted media
static intERROR_GENERAL_READ_ERROR
          General read error on CD/DVD media
static intERROR_GENERAL_SEEK_ERROR
          General seek error on CD/DVD media
static intERROR_ILLEGAL_OPERATION_FOR_TRACK
          Illegal operation for track
static intERROR_INVALID_EXCEPTION
          Exception was not allocated
static intERROR_INVALID_INPUT_PARAMETER
          User input parameter is not valid
static intERROR_INVALID_RESPONSE
          Something really unsupposed returned
static intERROR_INVALID_STATE
          The state of the object is not valid for current operation
static intERROR_MEMORY_ALLOCATION_FAILED
          Memory allocation failed
static intERROR_NOT_FOUND
          Operation could not be performed b/s either device or requested parameter not found
static intERROR_NOT_IMPLEMENTED
          Feature is not implemented yet
static intERROR_PATH_TOO_LONG
          File path is too long
static intERROR_RANGE
          Passed range is not valid
static intERROR_REGISTRATION_FAILED
          Registration procedure completed with errors
static intERROR_REQUEST_TOO_LARGE
          Request size is too large to be handled
static intERROR_SCSI_CDB_FAILED
          SCSI CDB delivery failed
static intERROR_SCSI_DEVICE_BUSY
          SCSI device is busy for a while
static intERROR_SCSI_DEVICE_INVALID_TYPE
          SCSI device of this type is not supported
static intERROR_SCSI_TRANSPORT_FAILED
          SCSI transport internal error
static intERROR_SUCCESS
          Nothing really happened, operation completed successfuly
static intERROR_SYSTEM_CALL_FAILED
          System call failed, check SystemError pointer to system error value
static intERROR_SYSTEM_CALL_FAILED_EX
          Middle-layer error happened, check SystemError pointer for specific error value
static intERROR_UNDER_CONSTRUCTION
          This feature is still under construction
static intERROR_UNRECOGNIZED_MEDIA
          Current media type is not recognized
static intERROR_UNSUPPORTED_AUDIO
          Unsupported audio format used as either input or output
static intERROR_UNSUPPORTED_READ_MODE
          Currently selected read mode is not supported by device
static intERROR_USER_EXCEPTION
          This is not a real exception just the result of user interaction
static intERROR_VERIFY_FAILED
          Verify operation found different memory buffers
static intMODE_DISC_AT_ONCE_PQ
          Disc-At-Once PQ mode
static intMODE_DISC_AT_ONCE_RAW_PW
          Disc-At-Once Raw PW mode
static intMODE_SESSION_AT_ONCE
          Session-At-Once mode
static intMODE_TRACK_AT_ONCE
          Track-At-Once write mode
static intREAD_MODE_COOKED
          Cooked data
static intREAD_MODE_PQ
          PQ subchannel only (no main channel data)
static intREAD_MODE_RAW
          Raw data
static intREAD_MODE_RAW_PQ
          Raw data + PQ subchannel
static intREAD_MODE_RAW_PW
          Raw P-W subchannel only (no main channel data)
static intREAD_MODE_RAW_RAW_PW
          Raw data + raw P-W subchannel
static intСD_SPEED_IN_KBPS_16X
          16X CD speed constant
 
Constructor Summary
JStarBurnBurnerGrabber(byte portId, byte busId, byte targetId, byte lun, JStarBurnCallBack callback)
          Constructs new object with passed device SCSI address (i.e 1,0,1,0)
JStarBurnBurnerGrabber(JStarBurnCallBack callback)
          Constructs new object without attaching it to device (e.g for creating file system image)
JStarBurnBurnerGrabber(java.lang.String deviceName, JStarBurnCallBack callback)
          Constructs new object with passed device name
 
Method Summary
 voidaddFile(java.lang.String filePath)
          Add file or directory to file tree root directory
 voidaddFile(java.lang.String parentPath, java.lang.String filePath)
          Add file or directory to file tree
 voidburnFileTree()
          Burns ISO/Joliet file tree on disc using current settings
 voidburnIsoImage(java.lang.String imageName)
          Burns ISO image (raw file system image).
 voidburnMdsImage(java.lang.String imageName)
          Burns MDS image .
 voidcancelCurrentAction()
          Cancels cuurent read or write process
 voidcreateDir(java.lang.String name)
          Create new directory in file tree root directory
 voidcreateDir(java.lang.String parentPath, java.lang.String name)
          Create new directory in file tree
 voidejectDisc()
          Ejects disc tray
 voidenableBUP(boolean enableBUP)
          Enable BUP (Buffer Underrun Protection) (default : true)
 voideraseDisc(int eraseType)
          Erases disc (this operation cannot be interrupted!)
 voidfreeResources()
          Frees resources allocated by StarBurn library.
 booleangetBUPEnabled()
           
 DiscInfogetDiscInformation()
          Reads basic disc information
 intgetDvdPadding()
          Get current DVD padding
 java.lang.StringgetFileTreeLabel()
          Get file tree label
 intgetLastError()
          Get error status from last operation (0 if no error occured)
 intgetMaxReadSpeed()
          Get maximum supported read speed for CD/DVD media currently inserted to CD/DVD burner device object
 intgetMaxWriteSpeed()
          Get maximum supported write speed for CD/DVD media currently inserted to CD/DVD burner device object
 booleangetNextSessionAllowed()
           
 intgetReadMode()
          Get current read mode
 intgetReadRetries()
          Get number of read retries for next grabbing operation
 intgetReadSpeed()
          Get current read speed for CD/DVD media currently inserted to CD/DVD burner device object
 booleangetSendOPC()
           
 booleangetTestMode()
           
 booleangetVerifyNeeded()
          Get verify needed flag (if set verfication is done after each burn)
 intgetWriteMode()
          Get current write mode
 intgetWriteSpeed()
          Get current write speed for CD/DVD media currently inserted to CD/DVD burner device object
 voidgrabToIso(java.lang.String imageName)
          Grab disc to ISO image
 voidgrabToMds(java.lang.String imageName)
          Grab disc to MDS image
 voidimportTrack(int trackNumber)
          Imports track in file tree
 voidlock()
          Lock device tray
static voidregister(byte[] licenseKey)
          Register StarBurn library
 voidrelease()
          Release device tray
 voidresetFileTree()
          Reset file tree (delete all files in it) (must be invoked after all work with file tree is done)
 voidsaveTreeToImage(java.lang.String imageName)
          Creates ISO image from current file tree
static java.util.ListscanDevices()
          Scans system for available devices.
 voidsetDvdPadding(int dvdPadding)
          Set DVD padding for MDS images
 voidsetFileTreeLabel(java.lang.String fileTreeLabel)
          Set file tree label (default : "NEW")
 voidsetNextSessionAllowed(boolean nextSessionAllowed)
          Set flag to allow next session on disc (default : true)
 voidsetReadMode(int readMode)
          Set read mode (default : READ_MODE_COOKED)
 voidsetReadRetries(int readRetries)
          Set number of read retries for next grabbing operation (default : 1)
 voidsetReadSpeed(int readSpeed)
          Set read speed for CD/DVD media currently inserted to CD/DVD burner device object
 voidsetSendOPC(boolean sendOPC)
          Set send OPC (Optimum Power Calibraton) flag (default: true)
 voidsetTestMode(boolean testMode)
          Set test mode flag.
 voidsetVerifyNeeded(boolean verifyNeeded)
          Set verify needed flag (if set verfication is done after each burn) (default : false)
 voidsetWriteMode(int writeMode)
          Set write mode for next burn (default : Track-At-Once)
 voidsetWriteSpeed(int writeSpeed)
          Set write speed for CD/DVD media currently inserted to CD/DVD burner device object
static voidunregister()
          Unregisters StarBurn library.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_SUCCESS

public static final int ERROR_SUCCESS
Nothing really happened, operation completed successfuly

See Also:
Constant Field Values

ERROR_FAILURE

public static final int ERROR_FAILURE
Undefined error happened, something goes really wrong

See Also:
Constant Field Values

ERROR_INVALID_INPUT_PARAMETER

public static final int ERROR_INVALID_INPUT_PARAMETER
User input parameter is not valid

See Also:
Constant Field Values

ERROR_INVALID_STATE

public static final int ERROR_INVALID_STATE
The state of the object is not valid for current operation

See Also:
Constant Field Values

ERROR_MEMORY_ALLOCATION_FAILED

public static final int ERROR_MEMORY_ALLOCATION_FAILED
Memory allocation failed

See Also:
Constant Field Values

ERROR_SYSTEM_CALL_FAILED

public static final int ERROR_SYSTEM_CALL_FAILED
System call failed, check SystemError pointer to system error value

See Also:
Constant Field Values

ERROR_SCSI_TRANSPORT_FAILED

public static final int ERROR_SCSI_TRANSPORT_FAILED
SCSI transport internal error

See Also:
Constant Field Values

ERROR_SCSI_DEVICE_BUSY

public static final int ERROR_SCSI_DEVICE_BUSY
SCSI device is busy for a while

See Also:
Constant Field Values

ERROR_SCSI_CDB_FAILED

public static final int ERROR_SCSI_CDB_FAILED
SCSI CDB delivery failed

See Also:
Constant Field Values

ERROR_SCSI_DEVICE_INVALID_TYPE

public static final int ERROR_SCSI_DEVICE_INVALID_TYPE
SCSI device of this type is not supported

See Also:
Constant Field Values

ERROR_INVALID_RESPONSE

public static final int ERROR_INVALID_RESPONSE
Something really unsupposed returned

See Also:
Constant Field Values

ERROR_BUFFER_UNDERRUN

public static final int ERROR_BUFFER_UNDERRUN
Buffer underrun happened

See Also:
Constant Field Values

ERROR_INVALID_EXCEPTION

public static final int ERROR_INVALID_EXCEPTION
Exception was not allocated

See Also:
Constant Field Values

ERROR_ACCESS_TO_FEATURE_DENIED

public static final int ERROR_ACCESS_TO_FEATURE_DENIED
Access to feature denied b/s of the wrong version

See Also:
Constant Field Values

ERROR_USER_EXCEPTION

public static final int ERROR_USER_EXCEPTION
This is not a real exception just the result of user interaction

See Also:
Constant Field Values

ERROR_PATH_TOO_LONG

public static final int ERROR_PATH_TOO_LONG
File path is too long

See Also:
Constant Field Values

ERROR_UNDER_CONSTRUCTION

public static final int ERROR_UNDER_CONSTRUCTION
This feature is still under construction

See Also:
Constant Field Values

ERROR_NOT_FOUND

public static final int ERROR_NOT_FOUND
Operation could not be performed b/s either device or requested parameter not found

See Also:
Constant Field Values

ERROR_FILE_TOO_BIG

public static final int ERROR_FILE_TOO_BIG
File is too big for the requested operation

See Also:
Constant Field Values

ERROR_NOT_IMPLEMENTED

public static final int ERROR_NOT_IMPLEMENTED
Feature is not implemented yet

See Also:
Constant Field Values

ERROR_RANGE

public static final int ERROR_RANGE
Passed range is not valid

See Also:
Constant Field Values

ERROR_REGISTRATION_FAILED

public static final int ERROR_REGISTRATION_FAILED
Registration procedure completed with errors

See Also:
Constant Field Values

ERROR_UNSUPPORTED_AUDIO

public static final int ERROR_UNSUPPORTED_AUDIO
Unsupported audio format used as either input or output

See Also:
Constant Field Values

ERROR_BUFFER_TOO_SMALL

public static final int ERROR_BUFFER_TOO_SMALL
Buffer size supplied by caller is not sufficient

See Also:
Constant Field Values

ERROR_SYSTEM_CALL_FAILED_EX

public static final int ERROR_SYSTEM_CALL_FAILED_EX
Middle-layer error happened, check SystemError pointer for specific error value

See Also:
Constant Field Values

ERROR_ERROR_RECOVERY_FAILED

public static final int ERROR_ERROR_RECOVERY_FAILED
Error recovery failed

See Also:
Constant Field Values

ERROR_UNRECOGNIZED_MEDIA

public static final int ERROR_UNRECOGNIZED_MEDIA
Current media type is not recognized

See Also:
Constant Field Values

ERROR_GENERAL_SEEK_ERROR

public static final int ERROR_GENERAL_SEEK_ERROR
General seek error on CD/DVD media

See Also:
Constant Field Values

ERROR_GENERAL_READ_ERROR

public static final int ERROR_GENERAL_READ_ERROR
General read error on CD/DVD media

See Also:
Constant Field Values

ERROR_ILLEGAL_OPERATION_FOR_TRACK

public static final int ERROR_ILLEGAL_OPERATION_FOR_TRACK
Illegal operation for track

See Also:
Constant Field Values

ERROR_UNSUPPORTED_READ_MODE

public static final int ERROR_UNSUPPORTED_READ_MODE
Currently selected read mode is not supported by device

See Also:
Constant Field Values

ERROR_REQUEST_TOO_LARGE

public static final int ERROR_REQUEST_TOO_LARGE
Request size is too large to be handled

See Also:
Constant Field Values

ERROR_FULL_ERASE_REQUIRED

public static final int ERROR_FULL_ERASE_REQUIRED
Full erase required before recording to inserted media

See Also:
Constant Field Values

ERROR_VERIFY_FAILED

public static final int ERROR_VERIFY_FAILED
Verify operation found different memory buffers

See Also:
Constant Field Values

ERROR_DPM_FAILED

public static final int ERROR_DPM_FAILED
DPM associated call failed

See Also:
Constant Field Values

ERROR_DEVICE_SHARING_VIOLATION

public static final int ERROR_DEVICE_SHARING_VIOLATION
Device failed to open b/s of sharing violation

See Also:
Constant Field Values

MODE_TRACK_AT_ONCE

public static final int MODE_TRACK_AT_ONCE
Track-At-Once write mode

See Also:
Constant Field Values

MODE_SESSION_AT_ONCE

public static final int MODE_SESSION_AT_ONCE
Session-At-Once mode

See Also:
Constant Field Values

MODE_DISC_AT_ONCE_PQ

public static final int MODE_DISC_AT_ONCE_PQ
Disc-At-Once PQ mode

See Also:
Constant Field Values

MODE_DISC_AT_ONCE_RAW_PW

public static final int MODE_DISC_AT_ONCE_RAW_PW
Disc-At-Once Raw PW mode

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_1X

public static final int CD_SPEED_IN_KBPS_1X
1X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_2X

public static final int CD_SPEED_IN_KBPS_2X
2X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_2P2X

public static final int CD_SPEED_IN_KBPS_2P2X
2.2X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_3X

public static final int CD_SPEED_IN_KBPS_3X
3X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_4X

public static final int CD_SPEED_IN_KBPS_4X
4X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_6X

public static final int CD_SPEED_IN_KBPS_6X
6X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_8X

public static final int CD_SPEED_IN_KBPS_8X
6X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_10X

public static final int CD_SPEED_IN_KBPS_10X
8X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_12X

public static final int CD_SPEED_IN_KBPS_12X
12X CD speed constant

See Also:
Constant Field Values

СD_SPEED_IN_KBPS_16X

public static final int СD_SPEED_IN_KBPS_16X
16X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_20X

public static final int CD_SPEED_IN_KBPS_20X
20X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_24X

public static final int CD_SPEED_IN_KBPS_24X
24X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_40X

public static final int CD_SPEED_IN_KBPS_40X
40X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_44X

public static final int CD_SPEED_IN_KBPS_44X
44X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_48X

public static final int CD_SPEED_IN_KBPS_48X
48X CD speed constant

See Also:
Constant Field Values

CD_SPEED_IN_KBPS_52X

public static final int CD_SPEED_IN_KBPS_52X
52X CD speed constant

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_1X

public static final int DVD_SPEED_IN_KBPS_1X
1X DVD speed constant (DVD-R, DVD-RW and DVD-RAM)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_2X

public static final int DVD_SPEED_IN_KBPS_2X
2X DVD speed constant (DVD-R, DVD-RW and DVD-RAM)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_2DOT4X

public static final int DVD_SPEED_IN_KBPS_2DOT4X
2.4X DVD speed constant (DVD+R, DVD+R DL and DVD+RW)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_3X

public static final int DVD_SPEED_IN_KBPS_3X
3X DVD speed constant (DVD-RAM)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_4X

public static final int DVD_SPEED_IN_KBPS_4X
4X DVD speed constant (DVD-R, DVD-R DL, DVD-RW, DVD+R, DVD+R DL, DVD+RW and DVD-RAM)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_5X

public static final int DVD_SPEED_IN_KBPS_5X
5X DVD speed constant (DVD-RAM)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_6X

public static final int DVD_SPEED_IN_KBPS_6X
6X DVD speed constant (DVD-RW)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_8X

public static final int DVD_SPEED_IN_KBPS_8X
8X DVD speed constant (DVD-R, DVD-R DL, DVD+R, DVD+R DL and DVD+RW)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_12X

public static final int DVD_SPEED_IN_KBPS_12X
12X DVD speed constant (DVD-R, DVD+R)

See Also:
Constant Field Values

DVD_SPEED_IN_KBPS_16X

public static final int DVD_SPEED_IN_KBPS_16X
16X DVD speed constant (DVD+R)

See Also:
Constant Field Values

READ_MODE_COOKED

public static final int READ_MODE_COOKED
Cooked data

See Also:
Constant Field Values

READ_MODE_RAW

public static final int READ_MODE_RAW
Raw data

See Also:
Constant Field Values

READ_MODE_RAW_PQ

public static final int READ_MODE_RAW_PQ
Raw data + PQ subchannel

See Also:
Constant Field Values

READ_MODE_RAW_RAW_PW

public static final int READ_MODE_RAW_RAW_PW
Raw data + raw P-W subchannel

See Also:
Constant Field Values

READ_MODE_PQ

public static final int READ_MODE_PQ
PQ subchannel only (no main channel data)

See Also:
Constant Field Values

READ_MODE_RAW_PW

public static final int READ_MODE_RAW_PW
Raw P-W subchannel only (no main channel data)

See Also:
Constant Field Values

ERASE_TYPE_FAST

public static final int ERASE_TYPE_FAST
Fast erase (only TOC erased)

See Also:
Constant Field Values

ERASE_TYPE_FULL

public static final int ERASE_TYPE_FULL
Full erase

See Also:
Constant Field Values
Constructor Detail

JStarBurnBurnerGrabber

public JStarBurnBurnerGrabber(java.lang.String deviceName,
                              JStarBurnCallBack callback)
                       throws JStarBurnException
Constructs new object with passed device name

Parameters:
deviceName - symbolic device name (i.e '\\.\J:')
callback - callback object
Throws:
JStarBurnException

JStarBurnBurnerGrabber

public JStarBurnBurnerGrabber(byte portId,
                              byte busId,
                              byte targetId,
                              byte lun,
                              JStarBurnCallBack callback)
                       throws JStarBurnException
Constructs new object with passed device SCSI address (i.e 1,0,1,0)

Parameters:
portId - Port ID
busId - Bus ID
targetId - Target ID
lun - LUN
callback - callback object
Throws:
JStarBurnException

JStarBurnBurnerGrabber

public JStarBurnBurnerGrabber(JStarBurnCallBack callback)
                       throws JStarBurnException
Constructs new object without attaching it to device (e.g for creating file system image)

Parameters:
callback - callback object
Throws:
JStarBurnException
Method Detail

scanDevices

public static java.util.List scanDevices()
                                  throws JStarBurnException
Scans system for available devices. No error status is reserved for this operation

Returns:
List with DeviceInfo objects
Throws:
JStarBurnException - if library was not registered

freeResources

public void freeResources()
Frees resources allocated by StarBurn library. It required to invoke this method after work with library is done


unregister

public static void unregister()
Unregisters StarBurn library. Must be invoked after all work with library is done


getDiscInformation

public DiscInfo getDiscInformation()
                            throws JStarBurnException
Reads basic disc information

Returns:
DiscInfo object
Throws:
JStarBurnException

getLastError

public int getLastError()
Get error status from last operation (0 if no error occured)

Returns:
error status

burnIsoImage

public void burnIsoImage(java.lang.String imageName)
                  throws JStarBurnException
Burns ISO image (raw file system image).

Parameters:
imageName - raw file system image name
Throws:
JStarBurnException

burnMdsImage

public void burnMdsImage(java.lang.String imageName)
                  throws JStarBurnException
Burns MDS image .

Parameters:
imageName - MDS image name
Throws:
JStarBurnException

ejectDisc

public void ejectDisc()
               throws JStarBurnException
Ejects disc tray

Throws:
JStarBurnException

getTestMode

public boolean getTestMode()
Returns:
true if test mode flag is set

setTestMode

public void setTestMode(boolean testMode)
Set test mode flag. If flag is set, next burn will be in test mode (default : false)

Parameters:
testMode - test mode flag

getNextSessionAllowed

public boolean getNextSessionAllowed()
Returns:
true if next session is allowed on next burn

setNextSessionAllowed

public void setNextSessionAllowed(boolean nextSessionAllowed)
Set flag to allow next session on disc (default : true)

Parameters:
nextSessionAllowed - next session allowed flag

setWriteMode

public void setWriteMode(int writeMode)
Set write mode for next burn (default : Track-At-Once)

Parameters:
writeMode - write mode

getWriteMode

public int getWriteMode()
Get current write mode

Returns:
write mode

getReadSpeed

public int getReadSpeed()
                 throws JStarBurnException
Get current read speed for CD/DVD media currently inserted to CD/DVD burner device object

Returns:
read speed in KB/S
Throws:
JStarBurnException

getWriteSpeed

public int getWriteSpeed()
                  throws JStarBurnException
Get current write speed for CD/DVD media currently inserted to CD/DVD burner device object

Returns:
write speed in KB/s
Throws:
JStarBurnException

getMaxReadSpeed

public int getMaxReadSpeed()
                    throws JStarBurnException
Get maximum supported read speed for CD/DVD media currently inserted to CD/DVD burner device object

Returns:
maxiumum read speed in KB/s
Throws:
JStarBurnException

getMaxWriteSpeed

public int getMaxWriteSpeed()
                     throws JStarBurnException
Get maximum supported write speed for CD/DVD media currently inserted to CD/DVD burner device object

Returns:
maxiumum write speed in KB/s
Throws:
JStarBurnException

setReadSpeed

public void setReadSpeed(int readSpeed)
Set read speed for CD/DVD media currently inserted to CD/DVD burner device object

Parameters:
readSpeed - read speed in KB/s to set. (0 for maximum supported read speed)

setWriteSpeed

public void setWriteSpeed(int writeSpeed)
Set write speed for CD/DVD media currently inserted to CD/DVD burner device object

Parameters:
writeSpeed - write speed in KB/s to set. (0 for maximum supported write speed)

getBUPEnabled

public boolean getBUPEnabled()
Returns:
true if BUP (Buffer Underrun Protection) is enabled

enableBUP

public void enableBUP(boolean enableBUP)
Enable BUP (Buffer Underrun Protection) (default : true)

Parameters:
enableBUP - true to enable BUP

getSendOPC

public boolean getSendOPC()
Returns:
true if OPC (Optimum Power Calibration) is sent

setSendOPC

public void setSendOPC(boolean sendOPC)
Set send OPC (Optimum Power Calibraton) flag (default: true)

Parameters:
sendOPC - send OPC flag

eraseDisc

public void eraseDisc(int eraseType)
               throws JStarBurnException
Erases disc (this operation cannot be interrupted!)

Parameters:
eraseType - erase type (fast or full)
Throws:
JStarBurnException

grabToIso

public void grabToIso(java.lang.String imageName)
               throws JStarBurnException
Grab disc to ISO image

Parameters:
imageName - target image name
Throws:
JStarBurnException

grabToMds

public void grabToMds(java.lang.String imageName)
               throws JStarBurnException
Grab disc to MDS image

Parameters:
imageName - target image name (without MDS extension)
Throws:
JStarBurnException

getReadMode

public int getReadMode()
Get current read mode

Returns:
read mode constant

setReadMode

public void setReadMode(int readMode)
Set read mode (default : READ_MODE_COOKED)

Parameters:
readMode - read mode to set

getDvdPadding

public int getDvdPadding()
Get current DVD padding

Returns:
DVD padding value in MBs

setDvdPadding

public void setDvdPadding(int dvdPadding)
Set DVD padding for MDS images

Parameters:
dvdPadding - DVD padding value in MBs (default : 1024)

getReadRetries

public int getReadRetries()
Get number of read retries for next grabbing operation

Returns:
number of read retries

setReadRetries

public void setReadRetries(int readRetries)
Set number of read retries for next grabbing operation (default : 1)

Parameters:
readRetries - number of read retries

getVerifyNeeded

public boolean getVerifyNeeded()
Get verify needed flag (if set verfication is done after each burn)

Returns:
verify needed flag

setVerifyNeeded

public void setVerifyNeeded(boolean verifyNeeded)
Set verify needed flag (if set verfication is done after each burn) (default : false)

Parameters:
verifyNeeded - verify needed flag

addFile

public void addFile(java.lang.String parentPath,
                    java.lang.String filePath)
             throws JStarBurnException
Add file or directory to file tree

Parameters:
parentPath - relative path in file tree where file or dir should be placed
filePath - file or directory physical path
Throws:
JStarBurnException

addFile

public void addFile(java.lang.String filePath)
             throws JStarBurnException
Add file or directory to file tree root directory

Parameters:
filePath - file or directory physical path
Throws:
JStarBurnException

createDir

public void createDir(java.lang.String parentPath,
                      java.lang.String name)
               throws JStarBurnException
Create new directory in file tree

Parameters:
parentPath - relative path in file tree where new dir should be created
name - new directory name
Throws:
JStarBurnException

createDir

public void createDir(java.lang.String name)
               throws JStarBurnException
Create new directory in file tree root directory

Parameters:
name - new directory name
Throws:
JStarBurnException

burnFileTree

public void burnFileTree()
                  throws JStarBurnException
Burns ISO/Joliet file tree on disc using current settings

Throws:
JStarBurnException

getFileTreeLabel

public java.lang.String getFileTreeLabel()
Get file tree label

Returns:
file tree label

setFileTreeLabel

public void setFileTreeLabel(java.lang.String fileTreeLabel)
Set file tree label (default : "NEW")

Parameters:
fileTreeLabel - file tree label

resetFileTree

public void resetFileTree()
Reset file tree (delete all files in it) (must be invoked after all work with file tree is done)


importTrack

public void importTrack(int trackNumber)
                 throws JStarBurnException
Imports track in file tree

Parameters:
trackNumber - track numver to import
Throws:
JStarBurnException

lock

public void lock()
          throws JStarBurnException
Lock device tray

Throws:
JStarBurnException

release

public void release()
             throws JStarBurnException
Release device tray

Throws:
JStarBurnException

saveTreeToImage

public void saveTreeToImage(java.lang.String imageName)
                     throws JStarBurnException
Creates ISO image from current file tree

Parameters:
imageName - name of image file to create
Throws:
JStarBurnException

cancelCurrentAction

public void cancelCurrentAction()
Cancels cuurent read or write process


register

public static void register(byte[] licenseKey)
                     throws JStarBurnException
Register StarBurn library

Parameters:
licenseKey - license key (null to use non-commercial license)
Throws:
JStarBurnException