|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.io.IOException
com.flagstone.transform.coder.CoderException
public final class CoderException
CoderException is thrown when errors occur while encoding or decoding objects. Errors are reported as either underflow or overflow errors indicating that the class used to encode/decode a particular data structure did not encode or decode the expected number of bytes. This allows the majority of software errors and errors due to improperly encoded flash files to be detected.
Constructor Summary | |
---|---|
CoderException(int location,
int size,
int difference)
Creates a CoderException to report where a problem occurred when encoding or decoding a Flash (.swf) file. |
|
CoderException(int location,
String message)
Creates a CoderException to report where a problem occurred when encoding or decoding a Flash (.swf) file. |
Method Summary | |
---|---|
int |
getDelta()
Get the difference between the expected number of bytes and the actual number of bytes encoded or decoded. |
int |
getLength()
Get number of bytes the object was expected to occupy when encoded. |
int |
getStart()
Get the byte address of the start of the object that caused the error. |
String |
toString()
Get a string representation of the error. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CoderException(int location, String message)
location
- the address in the file where the data structure being
encoded/decoded is located. This is only valid for files being
decoded since the encoded file will not be written if an
exception occurs.message
- a short description of the error.public CoderException(int location, int size, int difference)
location
- the address in the file where the data structure being
encoded/decoded is located. This is only valid for files being
decoded since the encoded file will not be written if an
exception occurs.size
- the number of bytes that were expected to be encoded or
decoded.difference
- the difference between the expected number of bytes and the
actual number encoded or decoded.Method Detail |
---|
public int getStart()
public int getLength()
public int getDelta()
public String toString()
toString
in class Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |