Example usage for java.awt.color CMMException getMessage

List of usage examples for java.awt.color CMMException getMessage

Introduction

In this page you can find the example usage for java.awt.color CMMException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:net.sourceforge.atunes.kernel.modules.network.NetworkHandler.java

/**
 * Reads a Image from a given URLConnection.
 * //from w  w  w. j av a 2 s .  com
 * @param connection
 *            A URLConnection
 * 
 * @return The Image that was read from the URLConnection
 * 
 * @throws IOException
 *             If an IO exception occurs
 */
@Override
public Image getImage(final URLConnection connection) throws IOException {
    InputStream input = null;
    try {
        input = connection.getInputStream();
        return ImageIO.read(input);
    } catch (CMMException e) {
        // Exception reading image format
        Logger.error(e.getMessage());
        return null;
    } finally {
        ClosingUtils.close(input);
    }
}