You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
|
2
|
3
|
4
|
5
|
|
6
(1) |
7
(1) |
8
|
9
|
10
(1) |
11
|
12
(1) |
|
13
(1) |
14
|
15
|
16
|
17
|
18
|
19
|
|
20
|
21
|
22
|
23
|
24
|
25
|
26
(2) |
|
27
|
28
|
29
|
30
(11) |
31
|
|
|
|
From: <ka...@us...> - 2011-03-10 21:49:08
|
Revision: 3496
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3496&view=rev
Author: kappa1
Date: 2011-03-10 21:49:01 +0000 (Thu, 10 Mar 2011)
Log Message:
-----------
AppletLoader: clean up and simplify code relating to reading and writing cache/version files.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
Modified: trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-03-07 22:22:08 UTC (rev 3495)
+++ trunk/LWJGL/src/java/org/lwjgl/util/applet/AppletLoader.java 2011-03-10 21:49:01 UTC (rev 3496)
@@ -41,8 +41,6 @@
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.image.ImageObserver;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@@ -745,7 +743,7 @@
// if version file exists
if (versionFile.exists()) {
// compare to new version
- if (latestVersion != readVersionFile(versionFile)) {
+ if (latestVersion != readFloatFile(versionFile)) {
versionAvailable = true;
percentage = 90;
@@ -774,11 +772,11 @@
// save version information once jars downloaded successfully
if (version != null) {
percentage = 90;
- writeVersionFile(versionFile, latestVersion);
+ writeObjectFile(versionFile, latestVersion);
}
// save file names with last modified info once downloaded successfully
- writeCacheFile(new File(dir, "cache"), filesLastModified);
+ writeObjectFile(new File(dir, "timestamps"), filesLastModified);
}
// add the downloaded jars and natives to classpath
@@ -850,83 +848,81 @@
}
/**
- * read the current version file
+ * read float from File
*
- * @param file the file to read
- * @return the version value of saved file
- * @throws Exception if it fails to read value
+ * @param file to be read
+ * @return the float stored in the file or 0 if it fails
*/
- protected float readVersionFile(File file) throws Exception {
- FileInputStream fis = new FileInputStream(file);
+ protected float readFloatFile(File file) {
try {
- DataInputStream dis = new DataInputStream(fis);
- float version = dis.readFloat();
- dis.close();
- return version;
+ Float version = (Float)readObjectFile(file);
+ return version.floatValue();
} catch (Exception e) {
// failed to read version file
e.printStackTrace();
}
- finally {
- fis.close();
- }
// return 0 if failed to read file
return 0;
}
-
+
/**
- * write out version file of applet
+ * read the HashMap from File
*
- * @param file the file to write out to
- * @param version the version of the applet as a float
- * @throws Exception if it fails to write file
+ * @param file the file to read
+ * @return the hashmap stored in the file or an empty hashmap if it fails
*/
- protected void writeVersionFile(File file, float version) throws Exception {
- FileOutputStream fos = new FileOutputStream(file);
- DataOutputStream dos = new DataOutputStream(fos);
- dos.writeFloat(version);
- dos.close();
- fos.close();
+ @SuppressWarnings("unchecked")
+ protected HashMap<String, Long> readHashMapFile(File file) {
+
+ try {
+ return (HashMap<String, Long>) readObjectFile(file);
+ } catch (Exception e) {
+ // failed to read hashmap from file
+ e.printStackTrace();
+ }
+
+ // return an empty map if failed to read file
+ return new HashMap<String, Long>();
}
-
+
/**
- * read the current cache file
- *
+ * read the object from the File
+ *
* @param file the file to read
- * @return the hashmap containing the files names and lastModified times
- * @throws Exception if it fails to read hashmap
+ * @return the object contained in the file or null if it fails
+ * @throws Exception if it fails to read object from file
*/
- @SuppressWarnings("unchecked")
- protected HashMap<String, Long> readCacheFile(File file) throws Exception {
+ protected Object readObjectFile(File file) throws Exception {
FileInputStream fis = new FileInputStream(file);
+
try {
ObjectInputStream dis = new ObjectInputStream(fis);
- HashMap<String, Long> hashMap = (HashMap<String, Long>) dis.readObject();
+ Object object = dis.readObject();
dis.close();
- return hashMap;
+ return object;
} catch (Exception e) {
- // failed to read cache file
+ // failed to read file
e.printStackTrace();
} finally {
fis.close();
}
- // return an empty map if failed to read file
- return new HashMap<String, Long>();
+ // return null if failed to read file
+ return null;
}
-
+
/**
- * write out cache file of applet
+ * write object to specified File
*
* @param file the file to write out to
- * @param filesLastModified the hashmap containing files names and lastModified times
+ * @param object the contents of the file
* @throws Exception if it fails to write file
*/
- protected void writeCacheFile(File file, HashMap<String, Long> filesLastModified) throws Exception {
+ protected void writeObjectFile(File file, Object object) throws Exception {
FileOutputStream fos = new FileOutputStream(file);
ObjectOutputStream dos = new ObjectOutputStream(fos);
- dos.writeObject(filesLastModified);
+ dos.writeObject(object);
dos.close();
fos.close();
}
@@ -1103,11 +1099,11 @@
URLConnection urlconnection;
- File cacheFile = new File(dir, "cache");
+ File timestampsFile = new File(dir, "timestamps");
- // if cache file exists, load it
- if (cacheFile.exists()) {
- filesLastModified = readCacheFile(cacheFile);
+ // if timestamps file exists, load it
+ if (timestampsFile.exists()) {
+ filesLastModified = readHashMapFile(timestampsFile);
}
// calculate total size of jars to download
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|