org.tranche.exceptions
Class ChunkDoesNotMatchHashException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by org.tranche.exceptions.ChunkDoesNotMatchHashException
All Implemented Interfaces:
java.io.Serializable

public class ChunkDoesNotMatchHashException
extends java.io.IOException

Author:
Bryan Smith - bryanesmith@gmail.com
See Also:
Serialized Form

Field Summary
static java.lang.String MESSAGE
           
 
Constructor Summary
ChunkDoesNotMatchHashException()
           
ChunkDoesNotMatchHashException(BigHash expectedHash, BigHash foundHash)
          Create exception based on the expected hash and the found (calculated) hash.
ChunkDoesNotMatchHashException(java.lang.String serializedMessage)
          Only use this constructor when re-creating a deserialized exception (i.e., creating exception from message sent from server to client).
 
Method Summary
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MESSAGE

public static final java.lang.String MESSAGE
See Also:
Constant Field Values
Constructor Detail

ChunkDoesNotMatchHashException

public ChunkDoesNotMatchHashException(BigHash expectedHash,
                                      BigHash foundHash)

Create exception based on the expected hash and the found (calculated) hash.

Parameters:
expectedHash - The hash associated with the chunk.
foundHash - The hash calculated based on chunks contents.

ChunkDoesNotMatchHashException

public ChunkDoesNotMatchHashException(java.lang.String serializedMessage)

Only use this constructor when re-creating a deserialized exception (i.e., creating exception from message sent from server to client).

Parameters:
serializedMessage -

ChunkDoesNotMatchHashException

public ChunkDoesNotMatchHashException()


This code is free for use both commercially and non-commercially as stated in the project's license