src/main/java/edu/ucla/library/bucketeer/converters/AbstractConverter.java
protected void run(final ProcessBuilder aProcessBuilder, final String aID, final Logger aLogger)
            throws IOException, InterruptedException {
        final Process process = aProcessBuilder.start();

        if (process.waitFor() != 0) {
            aLogger.error(new String(IOUtils.readBytes(process.getErrorStream()), StandardCharsets.UTF_8));
            throw new IOException(aLogger.getMessage(MessageCodes.BUCKETEER_001, aID));
        } else if (aLogger.isDebugEnabled()) {
            aLogger.debug(new String(IOUtils.readBytes(process.getInputStream()), StandardCharsets.UTF_8));
        }
    }
/**
     * Run the conversion process.
     *
     * @param aProcessBuilder A process builder that has the process to run
     * @param aID The ID for the image that's being converted
     * @throws IOException If the process has trouble reading or writing
     * @throws InterruptedException If the process has been interrupted
     */
Run the conversion process.
@param aProcessBuilder A process builder that has the process to run
@param aID The ID for the image that's being converted
@throws IOException If the process has trouble reading or writing
@throws InterruptedException If the process has been interrupted
Run the conversion process . @param aProcessBuilder A process builder that has the process to run @param aID The ID for the image that ' s being converted @throws IOException If the process has trouble reading or writing @throws InterruptedException If the process has been interrupted
protected void run(final ProcessBuilder aProcessBuilder, final String aID, final Logger aLogger)
            throws IOException, InterruptedException {
        final Process process = aProcessBuilder.start();
        if (process.waitFor() != 0) {
            aLogger.error(new String(IOUtils.readBytes(process.getErrorStream()), StandardCharsets.UTF_8));
            throw new IOException(aLogger.getMessage(MessageCodes.BUCKETEER_001, aID));
        } else if (aLogger.isDebugEnabled()) {
            aLogger.debug(new String(IOUtils.readBytes(process.getInputStream()), StandardCharsets.UTF_8));
        }
    }
protected void run ( final ProcessBuilder aProcessBuilder , final String aID , final Logger aLogger ) throws IOException , InterruptedException { final Process process = aProcessBuilder . start ( ) ; if ( process . waitFor ( ) != 0 ) { aLogger . error ( new String ( IOUtils . readBytes ( process . getErrorStream ( ) ) , StandardCharsets . UTF_8 ) ) ; throw new IOException ( aLogger . getMessage ( MessageCodes . BUCKETEER_001 , aID ) ) ; } else if ( aLogger . isDebugEnabled ( ) ) { aLogger . debug ( new String ( IOUtils . readBytes ( process . getInputStream ( ) ) , StandardCharsets . UTF_8 ) ) ; } }
Run the conversion process.
Run the conversion process .