com.ibm.jtopenlite

Class DataStreamException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.io.IOException
          • com.ibm.jtopenlite.DataStreamException
  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    DatabaseException


    public class DataStreamException
    extends java.io.IOException
    An IOException that represents an error processing a System i Host Server datastream reply.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String BAD_LENGTH
      Constant representing a datastream reply type that has an unexpected datastream length (LL).
      static java.lang.String BAD_REPLY
      Constant representing a datastream reply type that has an unexpected reply.
      static java.lang.String BAD_RETURN_CODE
      Constant representing a datastream reply type that has an unsuccessful return code.
      static java.lang.String ERROR_MESSAGE
      Constant representing a datastream reply type that contains an error message.
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected DataStreamException(java.lang.String type, java.lang.String dataStreamName, int value) 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addMessage(Message message)
      Associates a message with this exception.
      static DataStreamException badLength(java.lang.String dataStreamName, int value)
      Factory method for constructing a datastream exception with the provided bad length value.
      static DataStreamException badReply(java.lang.String dataStreamName, int codepoint)
      Factory method for constructing a datastream exception with the provided bad reply value.
      static DataStreamException badReturnCode(java.lang.String dataStreamName, int value)
      Factory method for constructing a datastream exception with the provided bad return code value.
      static DataStreamException errorMessage(java.lang.String dataStreamName, Message message)
      Factory method for constructing a datastream exception with the provided error message.
      java.lang.String getDataStreamName()
      Returns the name of the datastream that caused this exception.
      Message getErrorMessage()
      Returns the primary error message associated with this exception, if any.
      Message[] getErrorMessages()
      Returns the array of error messages associated with this exception, if any.
      java.lang.String getType()
      Returns the datastream reply type.
      int getValue()
      Returns the value associated with this exception, if any.
      • 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

      • BAD_RETURN_CODE

        public static final java.lang.String BAD_RETURN_CODE
        Constant representing a datastream reply type that has an unsuccessful return code.
        See Also:
        Constant Field Values
      • BAD_LENGTH

        public static final java.lang.String BAD_LENGTH
        Constant representing a datastream reply type that has an unexpected datastream length (LL).
        See Also:
        Constant Field Values
      • BAD_REPLY

        public static final java.lang.String BAD_REPLY
        Constant representing a datastream reply type that has an unexpected reply.
        See Also:
        Constant Field Values
      • ERROR_MESSAGE

        public static final java.lang.String ERROR_MESSAGE
        Constant representing a datastream reply type that contains an error message.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DataStreamException

        protected DataStreamException(java.lang.String type,
                           java.lang.String dataStreamName,
                           int value)
    >
    • Method Detail

      • getType

        public java.lang.String getType()
        Returns the datastream reply type.
      • getDataStreamName

        public java.lang.String getDataStreamName()
        Returns the name of the datastream that caused this exception.
      • getValue

        public int getValue()
        Returns the value associated with this exception, if any.
      • getErrorMessage

        public Message getErrorMessage()
        Returns the primary error message associated with this exception, if any.
      • addMessage

        public void addMessage(Message message)
        Associates a message with this exception.
      • getErrorMessages

        public Message[] getErrorMessages()
        Returns the array of error messages associated with this exception, if any.
      • badReturnCode

        public static DataStreamException badReturnCode(java.lang.String dataStreamName,
                                        int value)
        Factory method for constructing a datastream exception with the provided bad return code value.
      • badLength

        public static DataStreamException badLength(java.lang.String dataStreamName,
                                    int value)
        Factory method for constructing a datastream exception with the provided bad length value.
      • badReply

        public static DataStreamException badReply(java.lang.String dataStreamName,
                                   int codepoint)
        Factory method for constructing a datastream exception with the provided bad reply value.
      • errorMessage

        public static DataStreamException errorMessage(java.lang.String dataStreamName,
                                       Message message)
        Factory method for constructing a datastream exception with the provided error message.