Code example for AssetFileDescriptor

Methods: createInputStream, getLength

0
 
 
 
 
		// Read file 
		int size = (int) file.getLength();
	    byte[] data = new byte[size];
		BufferedInputStream buf = new BufferedInputStream(file.createInputStream());
        buf.read(data, 0, data.length);
        buf.close();
		 
		return data;
	} 
} 
 
 
 
 
/* 
Unzip helper from stack overflow at : 
http://stackoverflow.com/questions/11715855/steps-to-create-apk-expansion-file/11717019#11717019