Hi folks,
I have an int array, very large, I need to stick it into an output stream. One example is to a file.
Now, the only way I've found to get it working thus far is...
for(int i=0; i<oData_p.length; i++)
{
oOutputStream_c.write(oData_p[i] << 24);
oOutputStream_c.write(oData_p[i] >> 16 & 0xff);
oOutputStream_c.write(oData_p[i] >> 8 & 0xff);
oOutputStream_c.write(oData_p[i] & 0xff);
}
Which for a really large array is causing severe performance problems. Is there no other way to get the int array written to the stream other than this craziness? If I have the same data in a byte array its a million times quicker, but unfortunately (for me) the data is an int array when it 'gets to me' and there is nothin' I can do about it.
Thanks for the advice,
Jibber.