au.com.prunge.jgenfile
Class IncompleteCopyException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.io.IOException
                    |
                    +--au.com.prunge.jgenfile.JGenFileException
                          |
                          +--au.com.prunge.jgenfile.IncompleteCopyException
All Implemented Interfaces:
Serializable

public class IncompleteCopyException
extends JGenFileException

An exception that occurs when a copy operation copied some but not all of the bytes that were meant to be copied.

Version:
1.0
Author:
Peter Runge
See Also:
Serialized Form

Constructor Summary
IncompleteCopyException(long numBytes, long expectedBytes)
          Constructs an IncompleteCopyException.
IncompleteCopyException(String s, long numBytes, long expectedBytes)
          Constructs an IncompleteCopyException with the specified detail message.
IncompleteCopyException(String s, Throwable cause, long numBytes, long expectedBytes)
          Constructs an IncompleteCopyException with a cause and detail message.
IncompleteCopyException(Throwable cause, long numBytes, long expectedBytes)
          Constructs an IncompleteCopyException with a cause.
 
Method Summary
 long getExpectedBytes()
          Returns the number of bytes that were meant to be copied.
 long getNumBytes()
          Returns the number of bytes that were actually copied, or -1 if the number of bytes copied is unknown.
 
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
 

Constructor Detail

IncompleteCopyException

public IncompleteCopyException(long numBytes,
                               long expectedBytes)
Constructs an IncompleteCopyException.

Parameters:
numBytes - the actual number of bytes copied. Use -1 to indicate that the number of bytes copied is unknown.
expectedBytes - the number of bytes that were meant to be copied.

IncompleteCopyException

public IncompleteCopyException(String s,
                               long numBytes,
                               long expectedBytes)
Constructs an IncompleteCopyException with the specified detail message.

Parameters:
s - the detail message.
numBytes - the actual number of bytes copied. Use -1 to indicate that the number of bytes copied is unknown.
expectedBytes - the number of bytes that were meant to be copied.

IncompleteCopyException

public IncompleteCopyException(Throwable cause,
                               long numBytes,
                               long expectedBytes)
Constructs an IncompleteCopyException with a cause.

Parameters:
cause - the cause of this exception.
numBytes - the actual number of bytes copied. Use -1 to indicate that the number of bytes copied is unknown.
expectedBytes - the number of bytes that were meant to be copied.

IncompleteCopyException

public IncompleteCopyException(String s,
                               Throwable cause,
                               long numBytes,
                               long expectedBytes)
Constructs an IncompleteCopyException with a cause and detail message.

Parameters:
s - the detail message.
cause - the cause of this exception.
numBytes - the actual number of bytes copied. Use -1 to indicate that the number of bytes copied is unknown.
expectedBytes - the number of bytes that were meant to be copied.
Method Detail

getExpectedBytes

public long getExpectedBytes()
Returns the number of bytes that were meant to be copied.

Returns:
the number of bytes that were meant to be copied.

getNumBytes

public long getNumBytes()
Returns the number of bytes that were actually copied, or -1 if the number of bytes copied is unknown.

Returns:
the number of bytes that were actually copied, or -1.