JSANE v2.1 - Lab Asprise! All Rights Reserved.

com.asprise.util.jsane
Class JSane

java.lang.Object
  |
  +--com.asprise.util.jsane.JSane

public class JSane
extends java.lang.Object

Represents a connection to a local or remote SANE daemon.


Constructor Summary
JSane()
          Establishes a SANE connection to local host with default port.
JSane(java.lang.String host)
          Establishes a SANE connection to specified host with default port.
JSane(java.lang.String host, int port)
          Establishes a SANE connection to specified host and port.
 
Method Summary
 void close()
          Stops all the activities and closes the connection.
 com.asprise.util.jsane.JSaneDevice[] getAllDevices()
          Gets all the devices available.
 com.asprise.util.jsane.JSaneDevice getDeviceByName(java.lang.String name)
          Returns the device with specified name (case-sensitive).
 java.lang.String getHost()
           
 int getPort()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSane

public JSane(java.lang.String host,
             int port)
Establishes a SANE connection to specified host and port.

Parameters:
host -
port -

JSane

public JSane(java.lang.String host)
Establishes a SANE connection to specified host with default port.

Parameters:
host -

JSane

public JSane()
Establishes a SANE connection to local host with default port.

Method Detail

close

public void close()
Stops all the activities and closes the connection.


getAllDevices

public com.asprise.util.jsane.JSaneDevice[] getAllDevices()
                                                   throws java.io.IOException,
                                                          com.asprise.util.jsane.SaneException
Gets all the devices available.

Returns:
java.io.IOException
com.asprise.util.jsane.SaneException

getDeviceByName

public com.asprise.util.jsane.JSaneDevice getDeviceByName(java.lang.String name)
                                                   throws java.io.IOException,
                                                          com.asprise.util.jsane.SaneException
Returns the device with specified name (case-sensitive).

Parameters:
name -
Returns:
the device or null if not found.
java.io.IOException
com.asprise.util.jsane.SaneException

getHost

public java.lang.String getHost()
Returns:

getPort

public int getPort()
Returns:

JSANE v2.1 - Lab Asprise! All Rights Reserved.