public static Message parseMessage(Method parseMethod, InputStream in) {
    try {
      return (Message) parseMethod.invoke(null, in);
    } catch (IllegalArgumentException e) {
      throw new RuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    } catch (InvocationTargetException e) {
      throw new RuntimeException(e);
    }
  }
public static Message parseMessage(Method parseMethod, InputStream in) {
    try {
      return (Message) parseMethod.invoke(null, in);
    } catch (IllegalArgumentException e) {
      throw new RuntimeException(e);
    } catch (IllegalAccessException e) {
      throw new RuntimeException(e);
    } catch (InvocationTargetException e) {
      throw new RuntimeException(e);
    }
  }
public static Message parseMessage ( Method parseMethod , InputStream in ) { try { return ( Message ) parseMethod . invoke ( null , in ) ; } catch ( IllegalArgumentException e ) { throw new RuntimeException ( e ) ; } catch ( IllegalAccessException e ) { throw new RuntimeException ( e ) ; } catch ( InvocationTargetException e ) { throw new RuntimeException ( e ) ; } }
Parse the message in a given InputStream using scpecified Method
@param parseMethod the method used for parsing
@param in the input stream
@return the parsed message
Parse the message in a given InputStream using scpecified Method