public List<SaneDevice> listDevices() throws IOException, SaneException {
    outputStream.write(SaneRpcCode.SANE_NET_GET_DEVICES);
    outputStream.flush();
    return inputStream.readDeviceList();
  }
public List < SaneDevice > listDevices ( ) throws IOException , SaneException { outputStream . write ( SaneRpcCode . SANE_NET_GET_DEVICES ) ; outputStream . flush ( ) ; return inputStream . readDeviceList ( ) ; }
Lists the devices known to the SANE daemon.

@return a list of devices that may be opened, see {@link SaneDevice#open}
@throws IOException if an error occurs while communicating with the SANE daemon
@throws SaneException if the SANE backend returns an error in response to this request