net.sf.jsefa
Class DeserializationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.jsefa.DeserializationException
All Implemented Interfaces:
Serializable

public final class DeserializationException
extends RuntimeException

Exception thrown when an error occurs during deserialization.

Author:
Norman Lahme-Huetig
See Also:
Serialized Form

Constructor Summary
DeserializationException(String message)
          Constructs a new DeserializationException with the specified detail message.
DeserializationException(String message, Throwable cause)
          Constructs a new DeserializationException with the specified detail message and cause.
DeserializationException(Throwable cause)
          Constructs a new DeserializationException with the default detail message and cause.
 
Method Summary
 DeserializationException add(ObjectPathElement element)
          Adds the given object path element to the front of the object path.
 InputPosition getInputPosition()
          Returns the position within the input stream where the error occurred.
 String getMessage()
          
 List<ObjectPathElement> getObjectPath()
          Returns the object path.
 DeserializationException setInputPosition(InputPosition inputPosition)
          Sets the position within the input stream where the error occurred.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

DeserializationException

public DeserializationException(String message)
Constructs a new DeserializationException with the specified detail message.

Parameters:
message - the detail message.

DeserializationException

public DeserializationException(String message,
                                Throwable cause)
Constructs a new DeserializationException with the specified detail message and cause.

Parameters:
message - the detail message
cause - the cause

DeserializationException

public DeserializationException(Throwable cause)
Constructs a new DeserializationException with the default detail message and cause.

Parameters:
cause - the cause
Method Detail

setInputPosition

public DeserializationException setInputPosition(InputPosition inputPosition)
Sets the position within the input stream where the error occurred.

Parameters:
inputPosition - the input position
Returns:
this

add

public DeserializationException add(ObjectPathElement element)
Adds the given object path element to the front of the object path.

Parameters:
element - an object path element
Returns:
this

getInputPosition

public InputPosition getInputPosition()
Returns the position within the input stream where the error occurred.

Returns:
an input position

getObjectPath

public List<ObjectPathElement> getObjectPath()
Returns the object path.

Returns:
the object path

getMessage

public String getMessage()

Overrides:
getMessage in class Throwable


Copyright © 2014. All rights reserved.