org.apache.commons.net.io
Class CopyStreamException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.io.IOException
              extended byorg.apache.commons.net.io.CopyStreamException
All Implemented Interfaces:
java.io.Serializable

public class CopyStreamException
extends java.io.IOException

The CopyStreamException class is thrown by the org.apache.commons.io.Util copyStream() methods. It stores the number of bytes confirmed to have been transferred before an I/O error as well as the IOException responsible for the failure of a copy operation.

Version:
$Id: CopyStreamException.java,v 1.6 2003/01/26 04:33:32 brekke Exp $
Author:
Daniel F. Savarese
See Also:
Util, Serialized Form

Field Summary
private  java.io.IOException ioException
           
private  long totalBytesTransferred
           
 
Fields inherited from class java.lang.Exception
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
CopyStreamException(java.lang.String message, long bytesTransferred, java.io.IOException exception)
          Creates a new CopyStreamException instance.
 
Method Summary
 java.io.IOException getIOException()
          Returns the IOException responsible for the failure of a copy operation.
 long getTotalBytesTransferred()
          Returns the total number of bytes confirmed to have been transferred by a failed copy operation.
 
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

totalBytesTransferred

private long totalBytesTransferred

ioException

private java.io.IOException ioException
Constructor Detail

CopyStreamException

public CopyStreamException(java.lang.String message,
                           long bytesTransferred,
                           java.io.IOException exception)
Creates a new CopyStreamException instance.

Parameters:
message - A message describing the error.
bytesTransferred - The total number of bytes transferred before an exception was thrown in a copy operation.
exception - The IOException thrown during a copy operation.
Method Detail

getTotalBytesTransferred

public long getTotalBytesTransferred()
Returns the total number of bytes confirmed to have been transferred by a failed copy operation.

Returns:
The total number of bytes confirmed to have been transferred by a failed copy operation.

getIOException

public java.io.IOException getIOException()
Returns the IOException responsible for the failure of a copy operation.

Returns:
The IOException responsible for the failure of a copy operation.