Code example for FileInputStream

Methods: close, read

0
		return BitmapFactory.decodeByteArray(img, 0, img.length);
	} 
	 
	public static byte[] read(File file){
		try{ 
        	FileInputStream inputString = new FileInputStream(file);
        	byte[] ret = new byte[(int) file.length()];
        	if (encrypt) inputString.read();
        	inputString.read(ret);
        	inputString.close();
        	return ret;
        } catch (IOException e) {
        	e(e);
        } 
		return null; 
	} 
	 
	public static byte[] read(String dir, String filename){
		File file = getFile(dir, filename);
		return read(file);
	}