Code example for ByteArrayInputStream

Methods: decodeStream, close, toString

0
    	boolean didit = bitmap.compress(Bitmap.CompressFormat.JPEG, quality, bos);
         
    	Log.i("androframe", "didit?: "+didit);
    	 
        Log.i("androframe", "toByteArray");
        ByteArrayInputStream is = new ByteArrayInputStream(bos.toByteArray());
         
        Log.i("androframe", "toByteArray length:"+bos.toByteArray().length);
         
         
         
        Log.i("androframe", "size of bos: "+bos.size());
        Log.i("androframe", "is: "+is.toString());
         
        try { 
			bos.close();
		} catch (IOException e) {
 
			e.printStackTrace();
		} 
         
        Log.i("androframe", "decodeStream");
        bitmap = BitmapFactory.decodeStream(is);
 
        try { 
			is.close();
		} catch (IOException e) {
 
			e.printStackTrace();
		}