Code example for RandomAccessFile

Methods: closelengthread

0
		boolean removeFile = false;
		try { 
			File file = mCache.get(key);
			if (!file.exists())
				return null; 
			RAFile = new RandomAccessFile(file, "r");
			byte[] byteArray = new byte[(int) RAFile.length()];
			RAFile.read(byteArray);
			if (!Utils.isDue(byteArray)) {
				return Utils.clearDateInfo(byteArray);
			} else { 
				removeFile = true;
				return null; 
			} 
		} catch (Exception e) {
			e.printStackTrace();
			return null; 
		} finally { 
			if (RAFile != null) {
				try { 
					RAFile.close();
				} catch (IOException e) {
					e.printStackTrace();
				} 
			} 
			if (removeFile)
Connect your IDE to all the code out there  Get Codota for Java