Package org.jibx.runtime

Examples of org.jibx.runtime.JiBXParseException


     */
    public char convertChar(String text) throws JiBXException {
        try {
            return Utility.parseChar(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here


     */
    public long convertLong(String text) throws JiBXException {
        try {
            return Utility.parseLong(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

        if ("true".equalsIgnoreCase(text) || "1".equals(text)) {
            return true;
        } else if ("false".equalsIgnoreCase(text) || "0".equals(text)) {
            return false;
        }
        throw new JiBXParseException("Invalid boolean value " +
            buildPositionString(), text);
    }
View Full Code Here

     */
    public float convertFloat(String text) throws JiBXException {
        try {
            return Utility.parseFloat(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

     */
    public double convertDouble(String text) throws JiBXException {
        try {
            return Utility.parseDouble(text);
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

     */
    public Date convertDate(String text) throws JiBXException {
        try {
            return new Date(Utility.parseDateTime(text));
        } catch (JiBXException ex) {
            throw new JiBXParseException(ex.getMessage() + ' ' +
                buildPositionString(), text, ex.getRootCause());
        }
    }
View Full Code Here

        "namespace", "tag", "abc"));
    try  {
      uctx.parseContentInt("namespace", "tag");
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "tag", null));
    }
  }
View Full Code Here

    uctx.setDocument(new TestDocument("attr", "abc"));
    try  {
      uctx.attributeInt("namespace", "attr");
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "attr", null));
    }
  }
View Full Code Here

    uctx.setDocument(new TestDocument("attr", "abc"));
    try  {
      uctx.attributeInt("namespace", "attr", 5);
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "attr", null));
    }
  }
View Full Code Here

    uctx.setDocument(new TestDocument("attr", "abc"));
    try {
      uctx.attributeShort("namespace", "attr");
      fail("Expected JiBXParseException to be thrown");
    } catch (JiBXException e) {
      assertEquals(e, new JiBXParseException(null, "abc", "namespace", "attr", null));
    }
  }
View Full Code Here

TOP

Related Classes of org.jibx.runtime.JiBXParseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.