I am looking at the SNMPBEECodec which can be seen at this location
In particular I am looking at the function
int numBytes = 0;
int temp = length;
while (temp > 0)
temp = (int)Math.floor(temp / 256);
To answer the technical part of your question:
math.floor() is superfluous:
temp / 256 is an integer (by Java's rules for integer arithmetic), and using
Math.floor() on an integer is pointless. You could simply use
temp / 256.
Why the author did this is impossible to answer without reading their mind. The author might simply have been confused about the behaviour of division in Java, and decided to "play it safe" - but that is just speculation.