bundles/org.eclipse.packagedrone.utils/src/org/eclipse/packagedrone/utils/io/OutputSpooler.java
public String getChecksum ( final String fileName, final String algorithm )
    {
        if ( !this.digests.contains ( algorithm ) )
        {
            return null;
        }

        final String result = this.checksums.get ( fileName + ":" + algorithm );

        if ( result == null )
        {
            throw new IllegalStateException ( String.format ( "Stream '%s' not closed.", fileName ) );
        }

        return result;
    }
public String getChecksum ( final String fileName, final String algorithm )
    {
        if ( !this.digests.contains ( algorithm ) )
        {
            return null;
        }

        final String result = this.checksums.get ( fileName + ":" + algorithm );

        if ( result == null )
        {
            throw new IllegalStateException ( String.format ( "Stream '%s' not closed.", fileName ) );
        }

        return result;
    }
public String getChecksum ( final String fileName , final String algorithm ) { if ( ! this . digests . contains ( algorithm ) ) { return null ; } final String result = this . checksums . get ( fileName + ":" + algorithm ) ; if ( result == null ) { throw new IllegalStateException ( String . format ( "Stream '%s' not closed." , fileName ) ) ; } return result ; }
Get the digest of a closed file

@param fileName
the file name to get the digest for
@param algorithm
the digest algorithm
@return the digest or <code>null</code> if the digest was not requested.
The digest will be lower case hex encoded.
@throws IllegalStateException
If the file is still open or was never opened
Get the digest of a closed file