private byte[] getContent()
        throws IOException
    {
        InputStream is = null;
        try
        {
            MessageDigest digest = MessageDigest.getInstance( "MD5" );
            digest.reset();
            byte[] buffer = new byte[8192];
            int read;
            try
            {
                is = entry.getInputStream();
                while ( ( read = is.read( buffer ) ) > 0 )
                {
                    digest.update( buffer, 0, read );
                }
            }
            catch ( IOException e )
            {
                if ( is != null )
                {
                    throw e;
                }
            }
            final String md5 = StringUtils.leftPad( new BigInteger( 1, digest.digest() ).toString( 16 ), 32, "0" );
            return md5.getBytes();
        }
        catch ( NoSuchAlgorithmException e )
        {
            IOException ioe = new IOException( "Unable to calculate hash" );
            ioe.initCause( e );
            throw ioe;
        }
        finally
        {
            IOUtils.closeQuietly( is );
        }
    }
private byte [ ] getContent ( ) throws IOException { InputStream is = null ; try { MessageDigest digest = MessageDigest . getInstance ( "MD5" ) ; digest . reset ( ) ; byte [ ] buffer = new byte [ 8192 ] ; int read ; try { is = entry . getInputStream ( ) ; while ( ( read = is . read ( buffer ) ) > 0 ) { digest . update ( buffer , 0 , read ) ; } } catch ( IOException e ) { if ( is != null ) { throw e ; } } final String md5 = StringUtils . leftPad ( new BigInteger ( 1 , digest . digest ( ) ) . toString ( 16 ) , 32 , "0" ) ; return md5 . getBytes ( ) ; } catch ( NoSuchAlgorithmException e ) { IOException ioe = new IOException ( "Unable to calculate hash" ) ; ioe . initCause ( e ) ; throw ioe ; } finally { IOUtils . closeQuietly ( is ) ; } }
Generates the digest.

@return the digest.
@throws IOException if the backing entry could not be read.
@since 1.0