How to convert C++ code into java
<p>I am trying to convert C++ code to Java but am stuck at the following line</p>

<pre><code>memcpy(cmd-&gt;CommandData+2, &amp;m_UnitData[i].Value, 2);
</code></pre>

<p>I also use cpp to java converter but it does not change anything here. <code>CommandData</code> and <code>UnitData</code> are byte arrays in my Java class.</p>

<p>This is original cpp code:</p>

<pre><code>unsigned char CommandData[255];
private SUnitData[] m_UnitData;
cmd-&gt;CommandData[0] = SSP_CMD_SET_COIN_MECH_INHIBITS;
cmd-&gt;CommandData[1] = 0x01; 
memcpy(cmd-&gt;CommandData+2, &amp;m_UnitData[i].Value, 2);
</code></pre>

<p>Are there any alternatives to <code>memcpy()</code> in java?</p>
