Code example for StatFs

Methods: getBlockCount, getBlockSize

0
	} 
 
	private long getTotalInternalMemorySize() 
	{ 
		final File path = Environment.getDataDirectory();
		final StatFs stat = new StatFs(path.getPath());
		final long blockSize = stat.getBlockSize();
		final long totalBlocks = stat.getBlockCount();
		return totalBlocks * blockSize;
	} 
 
	public synchronized void uncaughtException(final Thread t, final Throwable e)
	{ 
		report.append("=== collected at exception time ===\n\n");
 
		report.append("Total Internal memory: " + getTotalInternalMemorySize() + "\n");
		report.append("Available Internal memory: " + getAvailableInternalMemorySize() + "\n");
		report.append("\n");
 
		final Writer result = new StringWriter();
		final PrintWriter printWriter = new PrintWriter(result);