Example usage for org.apache.commons.compress.compressors CompressorException getLocalizedMessage

List of usage examples for org.apache.commons.compress.compressors CompressorException getLocalizedMessage

Introduction

In this page you can find the example usage for org.apache.commons.compress.compressors CompressorException getLocalizedMessage.

Prototype

public String getLocalizedMessage() 

Source Link

Document

Creates a localized description of this throwable.

Usage

From source file:it.geosolutions.tools.compress.file.test.ExtractorTest.java

@Test
public void extractorGZip() throws FileNotFoundException, IOException {

    try {/*w  w  w . j  av a  2s. c o m*/
        Extractor.extractGzip(compressed, tar);
        if (!tar.exists()) {
            Assert.fail("Failed to uncompress the gzip file");
        } else if (tar.length() != tarCompare.length()) {
            Assert.fail("Failed to compare the resulting tar file");
        }
    } catch (CompressorException e) {
        LOGGER.log(Level.ERROR, e.getMessage(), e);
        Assert.fail(e.getLocalizedMessage());
    }
}