title: Why is Math.floor() used instead of integer division in BER Codec
body: <p>I am looking at the SNMPBEECodec which can be seen at this <a href="http://gse.ufsc.br/~bezerra/disciplinas/tc/LucasWaechter/TC2/TC2/src/snmp/SNMPBERCodec.java" rel="noreferrer">location</a><br>
  In particular I am looking at the function <code>encodeLength()</code><br>
  A snippet I am interested in   </p>
  
  <pre><code>        int numBytes = 0;
          int temp = length;
          while (temp &gt; 0)
          {
              ++numBytes;
              temp = (int)Math.floor(temp / 256);
          }   
  </code></pre>
  
  <p>(from the <a href="http://gicl.cs.drexel.edu/people/sevy/snmp/" rel="noreferrer">Drexel SNMP library</a>).</p>
  
  <p>I would like to know why <code>Math.floor()</code> is used instead of just a simple integer division like <code>temp/256</code>. It seems the simple integer division would give the same result. Or is there a technical difference?</p>