Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "78 error in java
<p>I have a Signed msg with msg length appended:  </p>

<blockquote>
  <p>I agree all the terms and conditions that have been mentioned in the
  contract.
  3AACBCB0C8FA6A23C72ACBECDE626AC7CD09C9B514CB47E8263150608E915EC2F64F7A13AA7BFEFC49FF2FDE74C0E1F34B33AA964BD03858D67966199A19D4DA5A57566812694AC1B79835EC8A1893DD5CEA709F5B59CB966C6D068837406AB16C762494BD4C9BC0A66E23B5219932FB2DFC82A62D392C0F3C23C793855AAF6C0078</p>
</blockquote>

<p>here 78 is the length of message only.
i need to extract the message from the signed message by the help of the message length.
i used following code in java(netbeans):</p>

<pre><code>int MsgLen = Integer.parseInt(Msg.substring(Msg.length() - 4));
System.out.println("Message length: "+MsgLen);
</code></pre>

<p>But i am getting error like this:  </p>

<blockquote>
  <p>Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "78"</p>
</blockquote>

<p>if anybody could help me to solve the problem please post ur answer as soon as possible.....</p>
