code: public List<SaneDevice> listDevices() throws IOException, SaneException {
      outputStream.write(SaneRpcCode.SANE_NET_GET_DEVICES);
      outputStream.flush();
      return inputStream.readDeviceList();
    }
docs: 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