Class LazyParsingException

  • All Implemented Interfaces:
    Serializable

    public class LazyParsingException
    extends RuntimeException
    Thrown if the underlying stack supports lazy parsing, and a header failed to parse when the application requested the header value.

    This is an unchecked exception so that apps already written using JAIN SIP will still work.

    Applications that catch these exceptions can try to decode the offending header themselves by using the getUnparsedHeaderLine method to get the unparsed string value of the header.

    See Also:
    Serialized Form
    • Constructor Detail

      • LazyParsingException

        public LazyParsingException​(String message,
                                    String unparsedHeaderLine)
      • LazyParsingException

        public LazyParsingException​(String message,
                                    Throwable cause,
                                    String unparsedHeaderLine)
      • LazyParsingException

        public LazyParsingException​(String message,
                                    String headerName,
                                    String unparsedHeaderLine)
      • LazyParsingException

        public LazyParsingException​(String message,
                                    String headerName,
                                    Throwable cause,
                                    String unparsedHeaderLine)
    • Method Detail

      • hasHeaderName

        public boolean hasHeaderName()
      • getHeaderName

        public String getHeaderName()
        Get the name of the header that failed to parse.
        Returns:
        the header name, or null if not specified.
      • setHeaderName

        public void setHeaderName​(String name)
      • getUnparsedHeaderLine

        public String getUnparsedHeaderLine()
        Get the content of the header line that failed to parse
        Returns:
        the content of the header line that failed to parse