connecttopawan
connecttopawan

Reputation: 218

intValue() for huge Integer is throwing error

I working on an asn file structuring. My existing code is having data type as:

Fieldname::= INTEGER

As per my requirement, I changed it to:

Fieldname::= INTEGER --<HUGE>--

While parsing this value through java, I am using:

int intValue = Fieldname.intValue()

After changing datatype (huge integer) I am getting error:

Error:(750,121) java: cannot find symbol
Cannot resolve method 'intvalue'

This is issue with parser only. How to parse a string to huge int.

Upvotes: 2

Views: 445

Answers (2)

connecttopawan
connecttopawan

Reputation: 218

I have fixed this issue. I have used below code to parse the value in my java code.

BigInteger intValue = Fieldname.bigIntegerValue()

Upvotes: 0

YaFred
YaFred

Reputation: 10008

You don't say what tooling you are using.

EDIT: from your comment, I understand you are using OSS Nokalva. This is a commercial product and you should seek support from there.

However, this seems quite normal

The --<HUGE>-- is a hint (pragma) for your code generator to use something bigger than an int in your java code. (Note that, as far as asn.1 is concerned, it is just a comment).

Hence, the accessor will be different: longValue() or bitIntegerValue() or whatever your doc says.

Have a look at the generated code, you'll find it easily

Upvotes: 3

Related Questions