public Character read(String value) throws Exception {
  if (value.length() != 1) {
    throw new InvalidFormatException("Cannot convert '%s' to a character",value);
  }
  return value.charAt(0);
}

public Character read ( String value ) throws Exception { if ( value . length ( ) != 1 ) { throw new InvalidFormatException ( "Cannot convert '%s' to a character" , value ) ; } return value . charAt ( 0 ) ; }
this method is used to convert the string value given to an appropriate representation . this is used when an object is being deserialized from the xml document and the value for the string representation is required .
