Code example for BufferedInputStream

Methods: available, close, read

0
		if(!file.exists()) {
			return false; 
		} 
		//Log.v("file exists", "yes"); 
		FileInputStream fis = new FileInputStream(file);
		BufferedInputStream bis = new BufferedInputStream(fis);
		 
		//Log.v("boot.ini", Integer.toString(bis.available())); 
		 
		byte[] author = new byte[bis.available()];
		bis.read(author);
		bis.close();
		 
		 
		//Log.v("boot.ini", new String(author)); 
 
		try { 
			try { 
				Cipher cipher = Cipher.getInstance("RSA");
				cipher.init(Cipher.DECRYPT_MODE, getPrivateKey(new File(PRIKEYFILE)));
				byte[] de = cipher.doFinal(author);