/[classpath]/classpath/gnu/java/net/protocol/jar/JarURLConnection.java
ViewVC logotype

Diff of /classpath/gnu/java/net/protocol/jar/JarURLConnection.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mark, Sat Nov 23 00:52:10 2002 UTC revision 1.5 by mark, Sat Nov 23 22:39:54 2002 UTC
# Line 59  public class JarURLConnection extends ja Line 59  public class JarURLConnection extends ja
59    public static class JarFileCache    public static class JarFileCache
60    {    {
61      private static Hashtable cache = new Hashtable();      private static Hashtable cache = new Hashtable();
62      private static final int READBUFSIZE = 1024;      private static final int READBUFSIZE = 4*1024;
63      private static boolean is_trying = false;      private static boolean is_trying = false;
64            
65      public static synchronized JarFile get(URL url) throws IOException{      public static synchronized JarFile get(URL url) throws IOException{
# Line 79  public class JarURLConnection extends ja Line 79  public class JarURLConnection extends ja
79            FileOutputStream fos = new FileOutputStream(f = File.createTempFile("cache", "jar"));            FileOutputStream fos = new FileOutputStream(f = File.createTempFile("cache", "jar"));
80            int len = 0;            int len = 0;
81            while((len = is.read(buf)) != -1){            while((len = is.read(buf)) != -1){
82              fos.write(buf);              fos.write(buf, 0, len);
83            }            }
84            fos.close();            fos.close();
85            // Always verify the Manifest, open read only and delete when done.            // Always verify the Manifest, open read only and delete when done.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26