I have a parsing function that parses an encoded length from a byte buffer, it returns the parsed length as an int, and takes an index into the buffer as an integer arg. I
You can design new class like this:
public class Inte{
public int x=0;
}
later you can create object of this class :
Inte inte=new Inte();
then you can pass inte
as argument where you want to pass an integer variable:
public void function(Inte inte) {
some code
}
so for update the integer value:
inte.x=value;
for getting value:
Variable=inte.x;