title: Converting Java method to c or objective c
body: <p>My problem is i have java method i need to convert this objective i am trying this but its returning zero </p>
  
  <pre><code>-(char *)intToByteArray:(char *)data{
  int iii13=((int)((data[0]&gt;&gt;24),(data[1] &gt;&gt;16) ,(data[2] &gt;&gt;8),(data[3]&gt;&gt;0)));
  char* where = (char*)malloc(10);
  where[0] = *((char*)(&amp;iii13) + 0);
  where[1] = *((char*)(&amp;iii13) + 1);
  where[2] = *((char*)(&amp;iii13) + 2);
  where[3] = *((char*)(&amp;iii13) + 3);
  // 0
  // char *www11 = (char *)www13; 
  return where;  
  }
  &lt;=====================Java Code================&gt; is below
  
  public static final byte[] intToByteArray(int value) {
      return new byte[] {
              (byte)(value &gt;&gt;&gt; 24),
              (byte)(value &gt;&gt;&gt; 16),
              (byte)(value &gt;&gt;&gt; 8),
              (byte)value};
  }
  </code></pre>
  
  <p>I want <strong>return char</strong> itself so can anyone suggest me the proper way</p>