mirror of https://github.com/apache/archiva.git
[MRM-63] not able to hide, remove
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@370763 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8abd8e4ba8
commit
bcee846abd
|
@ -51,13 +51,11 @@ public class ChecksumApplet
|
||||||
add( progressBar, BorderLayout.CENTER );
|
add( progressBar, BorderLayout.CENTER );
|
||||||
JLabel label = new JLabel( "Checksum progress: " );
|
JLabel label = new JLabel( "Checksum progress: " );
|
||||||
add( label, BorderLayout.WEST );
|
add( label, BorderLayout.WEST );
|
||||||
setVisible( false );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String generateMd5( final String file )
|
public String generateMd5( final String file )
|
||||||
throws IOException, NoSuchAlgorithmException
|
throws IOException, NoSuchAlgorithmException
|
||||||
{
|
{
|
||||||
setVisible( true );
|
|
||||||
return (String) AccessController.doPrivileged( new PrivilegedAction()
|
return (String) AccessController.doPrivileged( new PrivilegedAction()
|
||||||
{
|
{
|
||||||
public Object run()
|
public Object run()
|
||||||
|
@ -67,10 +65,10 @@ public class ChecksumApplet
|
||||||
MessageDigest digest = MessageDigest.getInstance( "MD5" );
|
MessageDigest digest = MessageDigest.getInstance( "MD5" );
|
||||||
|
|
||||||
long total = new File( file ).length();
|
long total = new File( file ).length();
|
||||||
long totalRead = 0;
|
|
||||||
InputStream fis = new FileInputStream( file );
|
InputStream fis = new FileInputStream( file );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
long totalRead = 0;
|
||||||
byte[] buffer = new byte[CHECKSUM_BUFFER_SIZE];
|
byte[] buffer = new byte[CHECKSUM_BUFFER_SIZE];
|
||||||
int numRead;
|
int numRead;
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue