Read Contents of Raw File Sample

Posted on March 30, 2011
        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 ---");

QR code to ToughGuy app

Posted on November 02, 2010

This is the QR-Code to my Tough Guy app in the Android Market.


Link to the app in Android Market

Link to the app in AndroidZoom

Switch to our desktop site