com.asprise.util.jsane
Class JSane

java.lang.Object
  extended bycom.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.
 JSaneDevice[] getAllDevices()
          Gets all the devices available.
 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 JSaneDevice[] getAllDevices()
                            throws java.io.IOException,
                                   SaneException
Gets all the devices available.

Returns:
Throws:
java.io.IOException
SaneException

getDeviceByName

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

Parameters:
name -
Returns:
the device or null if not found.
Throws:
java.io.IOException
SaneException

getHost

public java.lang.String getHost()
Returns:

getPort

public int getPort()
Returns: