public class ChecksumObserver extends Object implements TransferListener
Constructor and Description |
---|
ChecksumObserver() |
ChecksumObserver(String algorithm) |
Modifier and Type | Method and Description |
---|---|
void |
debug(String message) |
protected String |
encode(byte[] binaryData)
Encodes a 128 bit or 160-bit byte array into a String.
|
String |
getActualChecksum()
Returns md5 checksum which was computed during transfer
|
void |
transferCompleted(TransferEvent transferEvent) |
void |
transferError(TransferEvent transferEvent) |
void |
transferInitiated(TransferEvent transferEvent) |
void |
transferProgress(TransferEvent transferEvent,
byte[] buffer,
int length) |
void |
transferStarted(TransferEvent transferEvent) |
public ChecksumObserver() throws NoSuchAlgorithmException
NoSuchAlgorithmException
public ChecksumObserver(String algorithm) throws NoSuchAlgorithmException
algorithm
- One of the algorithms supported by JDK: MD5, MD2 or SHA-1NoSuchAlgorithmException
public void transferInitiated(TransferEvent transferEvent)
transferInitiated
in interface TransferListener
public void transferStarted(TransferEvent transferEvent)
transferStarted
in interface TransferListener
TransferListener.transferStarted(org.apache.maven.wagon.events.TransferEvent)
public void transferProgress(TransferEvent transferEvent, byte[] buffer, int length)
transferProgress
in interface TransferListener
TransferListener.transferProgress(org.apache.maven.wagon.events.TransferEvent, byte[], int)
public void transferCompleted(TransferEvent transferEvent)
transferCompleted
in interface TransferListener
public void transferError(TransferEvent transferEvent)
transferError
in interface TransferListener
public void debug(String message)
debug
in interface TransferListener
public String getActualChecksum()
Copyright © 2003–2014 The Apache Software Foundation. All rights reserved.