Code example for ByteArrayInputStream

0
				return; 
 
			String decryptedData = intent
					.getStringExtra(FileDecryptionActivity.EXTRA_DECRYPTED_MESSAGE);
			BufferedReader reader = new BufferedReader(new InputStreamReader(
					new ByteArrayInputStream(decryptedData.getBytes())));
 
			OrgDatabase db = new OrgDatabase(this);
			OrgFileParser parser = new OrgFileParser(db, getContentResolver());
			parser.parse(new OrgFile(filename, name, checksum), reader, this);
			db.close();
			break; 
		} 
		finish();
	} 
     
	private boolean isAvailable() { 
		try { 
			PackageInfo pi = getPackageManager().getPackageInfo(
					mApgPackageName, 0);
Connect your IDE to all the code out there  Get Codota for Java