Java: Error "Incompatible datatypes"
<pre><code>private byte[] decode_text(byte[] image)
{
    int length = 0;
    int offset = 32;
    for(int i=0; i&lt;32; ++i)
    {
        length = (length &lt;&lt; 1) | (image[i] &amp; 1);
    }
    byte[] result = new byte[length];
    for(int b=0; b&lt;result.length; ++b )
    {
        for(int i=0; i&lt;8; ++i, ++offset)
            {
            /* I'm getting error at the following line */
            result = (byte)((result &lt;&lt; 1) | (image[offset] &amp; 1));
            }
        }
    return result;
}
</code></pre>

<p>Error is incompatible datatypes...required byte[] and found byte..........</p>
