All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.sevenzipjbinding.ExtractOperationResult Maven / Gradle / Ivy

Go to download

7-Zip-JBinding is a free cross-platform java binding of 7-Zip free compress/decompress library (http://www.7-zip.org/, http://p7zip.sourceforge.net/)

There is a newer version: 16.02-2.01
Show newest version
package net.sf.sevenzipjbinding;

/**
 * 
 * Enumeration of possible operation results by extracting operations.
 * 
 * @author Boris Brodski
 * @since 1.0
 */
public enum ExtractOperationResult {
    /**
     * Extraction was a success
     */
    OK,

    /**
     * Extraction failed: unknown compression method
     */
    UNSUPPORTEDMETHOD,

    /**
     * Extraction failed: data error
     */
    DATAERROR,

    /**
     * Extraction failed: CRC-check failed
     */
    CRCERROR,

    /**
     * Unknown extract operation result
     */
    UNKNOWN_OPERATION_RESULT;

    /**
     * Return extract operations enumeration item by index
     * 
     * @param index
     *            index of enumeration item
     * @return extract operations enumeration item by index
     */
    public static ExtractOperationResult getOperationResult(int index) {
        if (index >= 0 && index < values().length) {
            return values()[index];
        }

        return UNKNOWN_OPERATION_RESULT;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy