refine Ctype and ParsingException of java