|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.tuneology.sane.SaneScanner
Represents a connection to a hardware scanner device.
Method Summary | |
void |
cancel()
This function is used to immediately or as quickly as possible cancel the currently pending operation of the device. |
void |
close()
This function terminates the association between the scanner object and the device it represents. |
OptionDescriptor[] |
get_option_descriptors()
This function is used to access option descriptors. |
SaneParameters |
get_parameters()
This function is used to obtain the current scan parameters. |
int |
read(java.lang.Object buf,
int off,
int len)
This function is used to read image data from the device. |
void |
set_io_mode(boolean m)
This function is used to set the I/O mode of the scanner. |
void |
start()
This function initiates aquisition of an image from the scanner. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public OptionDescriptor[] get_option_descriptors()
public SaneParameters get_parameters()
public void start() throws SaneException
This function may fail with one of the following status codes:
STATUS_CANCELLED: The operation was cancelled through a call to sane_cancel.
STATUS_DEVICE_BUSY: The device is busy. The operation should be retried later.
STATUS_JAMMED: The document feeder is jammed.
STATUS_NO_DOCS: The document feeder is out of documents.
STATUS_COVER_OPEN: The scanner cover is open.
STATUS_IO_ERROR: An error occurred while communicating with the device.
STATUS_NO_MEM: An insufficent amount of memory is available.
SaneException
public int read(java.lang.Object buf, int off, int len) throws SaneException
1. If the device is in blocking I/O mode (the default mode), the call blocks until at least one data byte is available (or until some error occurs).
2. If the device is in non-blocking I/O mode, the call returns zero immediately.
The I/O mode can be set via a call to set_io_mode().
This function may fail by throwing one of the following SaneException values.
STATUS_CANCELLED: The operation was cancelled through a call to cancel().
STATUS_EOF: No more data is available for the current frame.
STATUS_JAMMED: The document feeder is jammed.
STATUS_NO_DOCS: The document feeder is out of documents.
STATUS_COVER_OPEN: The scanner cover is open.
STATUS_IO_ERROR: An error occurred while communicating with the device.
STATUS_NO_MEM: An insufficent amount of memory is available.
STATUS_ACCESS_DENIED: Access to the device has been denied due to insufficient or invalid authentication.
buf
- off
- len
-
SaneException
public void cancel()
public void set_io_mode(boolean m) throws SaneException
m
-
SaneException
public void close()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |