Back to project page android-sdk.
The source code is released under:
Copyright (c) 2013 Adcash OU. All rights reserved under Creative Commons Attribution 3.0 Unported http://creativecommons.org/licenses/by/3.0/ Redistribution and use in source and binary forms, with or...
If you think the Android project android-sdk listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.adcash.mobileads.util; /* w ww . j av a 2s .c o m*/ import java.io.*; public class Files { public static File createDirectory(String absolutePath) { if (absolutePath == null) { return null; } File directory = new File(absolutePath); if (directory.exists() && directory.isDirectory() || directory.mkdirs() && directory.isDirectory()) { return directory; } return null; } public static int intLength(File file) { if (file == null) { return 0; } long length = file.length(); if (length < Integer.MAX_VALUE) { return (int) length; } else { return Integer.MAX_VALUE; } } }