Code example for ByteArrayInputStream

Methods: decodeStream, close

0
 
				if (options.outHeight * options.outWidth > 512 * 512) {
					imageIsTooBig = true;
				} 
				else { 
					intputStream = new ByteArrayInputStream(contentBytes);
					bitmap = BitmapFactory.decodeStream(intputStream);
					intputStream.close();
				} 
 
			} catch (Exception e) {
				return params[0].dialogToShow("Couldn't view the Blob's contents", e);
			} catch (OutOfMemoryError e) {
				if (bitmap != null) {
					bitmap.recycle();
					bitmap = null;
				} 
				return params[0].dialogToShow("Couldn't view the Blob's contents", e);
			} 
			return null; 
		}