com.atlassian.confluence.pages.attachments
Class AttachmentDataStreamSizeMismatchException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.atlassian.confluence.pages.attachments.AttachmentDataStreamSizeMismatchException
All Implemented Interfaces:
java.io.Serializable

public class AttachmentDataStreamSizeMismatchException
extends java.lang.RuntimeException

Thrown when the the size of the InputStream received to create an attachment is different to the declared size or length of the attachment. This could happen if an upload is cancelled and only a portion of the file is transferred.

See Also:
Serialized Form

Constructor Summary
AttachmentDataStreamSizeMismatchException(long expectedSize, long actualSize)
          Constructs an AttachmentDataStreamSizeMismatchException.
 
Method Summary
 long getActualSize()
           
 long getExpectedSize()
           
 
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

AttachmentDataStreamSizeMismatchException

public AttachmentDataStreamSizeMismatchException(long expectedSize,
                                                 long actualSize)
Constructs an AttachmentDataStreamSizeMismatchException.

Parameters:
expectedSize - expected size in bytes
actualSize - actual size in bytes
Method Detail

getExpectedSize

public long getExpectedSize()
Returns:
expected size in bytes

getActualSize

public long getActualSize()
Returns:
actual size in bytes


Copyright © 2003-2014 Atlassian. All Rights Reserved.