InputStream iFile = getResources().openRawResource(R.raw.sample_stream);
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
int i;
try {
i = iFile.read();
while (i != -1)
{
byteArrayOutputStream.write(i);
i = iFile.read();
}
iFile.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Log.v(TAG, byteArrayOutputStream.toString());
Log.i(TAG, "--- Raw stream test ---");
Read Contents of Raw File Sample
QR code to ToughGuy app
This is the QR-Code to my Tough Guy app in the Android Market.
