public abstract class ScanManager extends Object implements Closeable
Modifier and Type | Method and Description |
---|---|
abstract void |
convertImage(String sourceFiles,
String targetFile,
String targetFormat,
int jpegQuality,
String tiffCompressionScheme) |
static ScanManager |
createDefaultManager()
Gets the scan manager instance.
|
static void |
enableLogDebugToConsole(boolean enable) |
static ScanManager |
getDefaultManager()
Gets the scan manager instance.
|
abstract List<Device> |
getDevices()
Lists all the devices available on the system.
|
abstract String |
getLibraryVersion() |
static File |
getTempFolder()
Returns the system temp folder.
|
boolean |
isActive()
Whether the manager is active.
|
static boolean |
isEnabledLogDebugToConsole() |
abstract void |
load()
Initializes the manager.
|
static void |
log(int level,
String mesg,
Object relatedObject) |
static void |
logDebug(String mesg) |
static void |
logDebug(String mesg,
Object relatedObject) |
static void |
logDebugToConsole(String mesg) |
static void |
logError(String mesg) |
static void |
logError(String mesg,
Object relatedObject) |
static void |
logInfo(String mesg) |
static void |
logInfo(String mesg,
Object relatedObject) |
static void |
logWarn(String mesg) |
static void |
logWarn(String mesg,
Object relatedObject) |
static void |
main(String[] args)
Prints the version information.
|
File[] |
quickScanUsingUI()
Performs a quick scan using system UI - dialogs are non-modal.
|
File[] |
quickScanUsingUI(File destinationFolder,
Component parentComponentForDialog)
Performs a quick scan using system UI.
|
abstract File[] |
quickScanUsingUI(File destinationFolder,
Component parentComponentForDialog,
String preferredFormat)
Performs a quick scan using system UI.
|
abstract Device |
selectDeviceByIdOrName(String idOrName)
Selects the device by id or name.
|
String |
selectDeviceUsingUI()
Prompts the system dialog in non-modal mode to allow the user to select a device.
|
abstract String |
selectDeviceUsingUI(Component parentComponentForDialog)
Prompts the system dialog in modal mode to allow the user to select a device
|
static void |
setLoggerObject(Object loggerObject)
The logger object should be an instance of: java.util.logging.Logger, org.slf4j.Logger, org.apache.log4j.Logger or java.io.PrintStream
|
abstract void |
unload()
Releases resources and invalidates the manager.
|
public static final String VERSION
public static ScanManager getDefaultManager()
public static ScanManager createDefaultManager()
public boolean isActive()
public abstract List<Device> getDevices() throws ScanException
ScanException
public abstract Device selectDeviceByIdOrName(String idOrName) throws ScanException
idOrName
- ScanException
public abstract String selectDeviceUsingUI(Component parentComponentForDialog) throws ScanException
parentComponentForDialog
- an optional UI component that owns the device selection dialog (modal).ScanException
public String selectDeviceUsingUI() throws ScanException
ScanException
public abstract File[] quickScanUsingUI(File destinationFolder, Component parentComponentForDialog, String preferredFormat) throws ScanException
destinationFolder
- folder to save scanned images into. Pass null
to use system temp.parentComponentForDialog
- an optional UI component that owns the device selection dialog (modal).preferredFormat
- e.g., 'jpg', 'png' - no guaranteenull
/empty array if user cancelledScanException
public File[] quickScanUsingUI(File destinationFolder, Component parentComponentForDialog) throws ScanException
destinationFolder
- folder to save scanned images into. Pass null
to use system temp.parentComponentForDialog
- an optional UI component that owns the device selection dialog (modal).null
/empty array if user cancelledScanException
public File[] quickScanUsingUI() throws ScanException
ScanException
public abstract void convertImage(String sourceFiles, String targetFile, String targetFormat, int jpegQuality, String tiffCompressionScheme) throws ScanException
ScanException
public static File getTempFolder()
public abstract void load() throws ScanException
ScanException
public abstract void unload() throws ScanException
ScanException
public abstract String getLibraryVersion() throws ScanException
ScanException
public static void setLoggerObject(Object loggerObject)
loggerObject
- public static boolean isEnabledLogDebugToConsole()
public static void enableLogDebugToConsole(boolean enable)
public static void logDebugToConsole(String mesg)
public static void logDebug(String mesg)
public static void logInfo(String mesg)
public static void logWarn(String mesg)
public static void logError(String mesg)
public static void main(String[] args)
args
- Copyright © 2014 LAB Asprise. All Rights Reserved.