Package org.apache.commons.net.io
Class CopyStreamException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.apache.commons.net.io.CopyStreamException
- All Implemented Interfaces:
Serializable
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 1299238 2012-03-10 17:12:28Z sebb $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private final long
-
Constructor Summary
ConstructorsConstructorDescriptionCopyStreamException
(String message, long bytesTransferred, IOException exception) Creates a new CopyStreamException instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the IOException responsible for the failure of a copy operation.long
Returns the total number of bytes confirmed to have been transferred by a failed copy operation.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
totalBytesTransferred
private final long totalBytesTransferred
-
-
Constructor Details
-
CopyStreamException
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 Details
-
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
Returns the IOException responsible for the failure of a copy operation.- Returns:
- The IOException responsible for the failure of a copy operation.
-