I am having a problem in my BOLDED code below whereby I am trying to convert a BIGINTEGER to an INT. Any direction or help would be appreciated. Here is my code:
// Check request version against response header version. int responseVersion; responseVersion = (int)responseheader.getVersion(); if ( //responseheader.getVersion().compareTo( responseVersion.compareTo( beginTransactionRequest.getHeader().getVersion() ) = 0 ) { Transaction transaction = new Transaction(); response.setTransactionID(BigInteger.valueOf(transaction.GetId())); }else{ responseheader.setStatus(Status.fromString("VersionNotSupported")); } return response;
Thanks for the reply. The getVersion method returns a BigInteger but I need to CAST that to an INT as well so I guess I should have put a (INT) in front of the second half of my assignment(?).