Code example for StatFs

Methods: getBlockCountgetBlockSize

	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");
		final Writer result = new StringWriter();
Connect your IDE to all the code out there  Get Codota for Java