edu.udayton.udri.asset.canon.ipcamera/src/edu/udayton/udri/asset/canon/ipcamera/IpCameraAsset.java
private float handleGetZoom() throws CommandExecutionException
    {
        final URL zoomUrl;
        try
        {
            zoomUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Zoom info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(zoomUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the properties file");
            throw new CommandExecutionException(ex);
        }
        final String zoomString = "c.1.zoom";
        final int cutOff = infoProp.getProperty(zoomString).indexOf('=');
        return (ZOOM_ADJUST - Float.parseFloat(infoProp.getProperty(zoomString)
                .substring(cutOff + 1))) / ZOOM_ADJUST; 
    }
/**
     * Method used to get the zoom for the sync command.
     * @return float
     *     current zoom value of the camera
     * @throws CommandExecutionException
     *     connecting to the IP camera.
     */
Method used to get the zoom for the sync command.
@return float
current zoom value of the camera
@throws CommandExecutionException
connecting to the IP camera.
Method used to get the zoom for the sync command . @return float current zoom value of the camera @throws CommandExecutionException connecting to the IP camera .
private float handleGetZoom() throws CommandExecutionException
    {
        final URL zoomUrl;
        try
        {
            zoomUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Zoom info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(zoomUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the properties file");
            throw new CommandExecutionException(ex);
        }
        final String zoomString = "c.1.zoom";
        final int cutOff = infoProp.getProperty(zoomString).indexOf('=');
        return (ZOOM_ADJUST - Float.parseFloat(infoProp.getProperty(zoomString)
                .substring(cutOff + 1))) / ZOOM_ADJUST; 
    }
private float handleGetZoom ( ) throws CommandExecutionException { final URL zoomUrl ; try { zoomUrl = new URL ( m_Url + INFOURL ) ; } catch ( final MalformedURLException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error creating the Zoom info URL" ) ; throw new CommandExecutionException ( ex ) ; } final URLConnection urlCon = getUrlConnection ( zoomUrl ) ; final InputStream infoInput = getInputStream ( urlCon ) ; final Properties infoProp = new Properties ( ) ; try { infoProp . load ( infoInput ) ; } catch ( final IOException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error creating the properties file" ) ; throw new CommandExecutionException ( ex ) ; } final String zoomString = "c.1.zoom" ; final int cutOff = infoProp . getProperty ( zoomString ) . indexOf ( '=' ) ; return ( ZOOM_ADJUST - Float . parseFloat ( infoProp . getProperty ( zoomString ) . substring ( cutOff + 1 ) ) ) / ZOOM_ADJUST ; }
Method used to get the zoom for the sync command.
Method used to get the zoom for the sync command .