jsane
This is the java wrapper to the SANE functions. I tried to keep the API as far as possible the way the SANE team designed it. But due to the way java works some things had to be changed.
- An unexpected status code in jsane.c will throw a SaneIOException.
- The read operation is designed to act like a java.io.InputStream read.
SaneScanner, SaneDevice
These classes add the GUI bits: a select dialog and an acquire dialog. They turn the image data into a BufferedImage object, if they can handle the data. Then they signal this event to the ScannerListener objects. Effectivly this is constituting a SANE frontend.
I haven't implemented some of the GUI-bits for some Option Descriptors. But I have tested the Frontend with the SANE test scanner and everything seems to work. In any case you should get all the data SANE supplies for this descriptor in a description panel.
SaneExample
You can find a simple application here:SaneExample.java.
And uk.co.mmscomputing.device.sane.jar here, which bundles all the necessary class files. In this scenario the jar file and the SaneExample.java file are in the same folder.
- Compile:
javac -classpath .:uk.co.mmscomputing.device.sane.jar SaneExample.java
- Run:
java -classpath .:uk.co.mmscomputing.device.sane.jar SaneExample
[1] SANE : www.sane-project.org [last accessed : 2003-11-18]
[2] Sheng Liang (1999), The Java Native Interface, SUN, Palo Alto
- OptionDescriptor.java
- Parameters.java
- SaneConstants.java
- SaneDevice.java
- SaneDeviceManager.java
- SaneExample.java
- SaneIOException.java
- SaneIOMetadata.java
- SaneNoDocumentsException.java
- SaneScanner.java
- jsane.java
- jsane.properties
- jsane_de.properties
- uk.co.mmscomputing.device.sane.jar
- uk_co_mmscomputing_device_sane_jsane.h
- uk.co.mmscomputing.device.sane.applet:
A very simple java scan applet for jsane. - uk.co.mmscomputing.device.sane.gui:
The GUI bits for the SANE frontend. - uk.co.mmscomputing.device.sane.lin32:
libjsane.so : The jsane cpp library for linux. - uk.co.mmscomputing.device.sane.option:
Option Descriptor classes for the jsane project.
- uk.co.mmscomputing.application.imageviewer:
A simple Multi Page Image Viewer Applet. To view multipage *.sff, *.tiff and *.gif files. Twain and SANE test application. - uk.co.mmscomputing.device.scanner:
Package scanner provides abstract parent classes to the classes in the twain and sane packages. - uk.co.mmscomputing.util:
A few useful utility classes