Java / Android - How to convert int array into smallest byte array?
<p>I need to convert an int array like this...</p>

<pre><code>int[] myInts = {
    99999,
    9999,
    99999,
    1,
    1234567890,
    24385933,
    99
};
</code></pre>

<p>...as efficiently as possible into a <code>byte[]</code> so it can be saved on an NFC tag.</p>

<p>I have seen <a href="https://stackoverflow.com/questions/1086054/how-to-convert-int-to-byte">this very similar question</a> from which I have tried the two the answers (<a href="https://stackoverflow.com/a/1086092/1617737">here</a> and <a href="https://stackoverflow.com/a/1086071/1617737">here</a>), but the byte arrays they create both have a length of 28.</p>

<p>Unfortunately, that's no good for me as <strong>I need to create a byte[] with a maximum length of 16</strong> (as the tag this data has to be saved on is a MIFARE Ultralight EV1).</p>

<p>Is there any other approach I could try in order to convert <code>myInts</code> to a <code>byte[16]</code>?</p>