Examples of CodingException


Examples of org.raist.common.codec.CodingException

      return Float.parseFloat(val);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

      return Double.parseDouble(val);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

      int rgba = Integer.parseInt(val, 16);
      return new Color(rgba);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

    if (val == null)
      return null;

    String[] tokens = val.split(ConsText.DilimDimension.v);
    if (tokens.length != 2)
      throw new CodingException("Invalid String representation for dimension.");

    try {

      int width = Integer.parseInt(tokens[0]);
      int height = Integer.parseInt(tokens[1]);

      return new Dimension(width, height);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here

Examples of org.raist.common.codec.CodingException

    if (val == null)
      return null;

    String[] tokens = val.split(ConsText.DilimPoint.v);
    if (tokens.length != 2)
      throw new CodingException("Invalid string representation of a Point value: " + val);

    try {

      int x = Integer.parseInt(tokens[0]);
      int y = Integer.parseInt(tokens[1]);
      return new Point(x, y);
    }
    catch (NumberFormatException ex) {

      throw new CodingException(ex.getMessage(), ex);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.