javaws

16:37:04.296 INFO  jd.cli.Main - Decompiling javaws.jar
package javax.jnlp;

import java.net.URL;

public abstract interface BasicService
{
  public abstract URL getCodeBase();
  
  public abstract boolean isOffline();
  
  public abstract boolean showDocument(URL paramURL);
  
  public abstract boolean isWebBrowserSupported();
}

/* Location:
 * Qualified Name:     javax.jnlp.BasicService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.awt.datatransfer.Transferable;

public abstract interface ClipboardService
{
  public abstract Transferable getContents();
  
  public abstract void setContents(Transferable paramTransferable);
}

/* Location:
 * Qualified Name:     javax.jnlp.ClipboardService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.IOException;
import java.net.URL;

public abstract interface DownloadService
{
  public abstract boolean isResourceCached(URL paramURL, String paramString);
  
  public abstract boolean isPartCached(String paramString);
  
  public abstract boolean isPartCached(String[] paramArrayOfString);
  
  public abstract boolean isExtensionPartCached(URL paramURL, String paramString1, String paramString2);
  
  public abstract boolean isExtensionPartCached(URL paramURL, String paramString, String[] paramArrayOfString);
  
  public abstract void loadResource(URL paramURL, String paramString, DownloadServiceListener paramDownloadServiceListener)
    throws IOException;
  
  public abstract void loadPart(String paramString, DownloadServiceListener paramDownloadServiceListener)
    throws IOException;
  
  public abstract void loadPart(String[] paramArrayOfString, DownloadServiceListener paramDownloadServiceListener)
    throws IOException;
  
  public abstract void loadExtensionPart(URL paramURL, String paramString1, String paramString2, DownloadServiceListener paramDownloadServiceListener)
    throws IOException;
  
  public abstract void loadExtensionPart(URL paramURL, String paramString, String[] paramArrayOfString, DownloadServiceListener paramDownloadServiceListener)
    throws IOException;
  
  public abstract void removeResource(URL paramURL, String paramString)
    throws IOException;
  
  public abstract void removePart(String paramString)
    throws IOException;
  
  public abstract void removePart(String[] paramArrayOfString)
    throws IOException;
  
  public abstract void removeExtensionPart(URL paramURL, String paramString1, String paramString2)
    throws IOException;
  
  public abstract void removeExtensionPart(URL paramURL, String paramString, String[] paramArrayOfString)
    throws IOException;
  
  public abstract DownloadServiceListener getDefaultProgressWindow();
}

/* Location:
 * Qualified Name:     javax.jnlp.DownloadService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import com.sun.jnlp.DownloadService2Impl.ResourceSpecAccess;

final class DownloadService2$ResourceSpec$1
  implements DownloadService2Impl.ResourceSpecAccess
{
  public void setSize(DownloadService2.ResourceSpec paramResourceSpec, long paramLong)
  {
    DownloadService2.ResourceSpec.access$002(paramResourceSpec, paramLong);
  }
  
  public void setLastModified(DownloadService2.ResourceSpec paramResourceSpec, long paramLong)
  {
    DownloadService2.ResourceSpec.access$102(paramResourceSpec, paramLong);
  }
  
  public void setExpirationDate(DownloadService2.ResourceSpec paramResourceSpec, long paramLong)
  {
    DownloadService2.ResourceSpec.access$202(paramResourceSpec, paramLong);
  }
}

/* Location:
 * Qualified Name:     javax.jnlp.DownloadService2.ResourceSpec.1
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import com.sun.jnlp.DownloadService2Impl;
import com.sun.jnlp.DownloadService2Impl.ResourceSpecAccess;

public class DownloadService2$ResourceSpec
{
  private String url;
  private String version;
  private int type;
  private long size;
  private long lastModified;
  private long expirationDate;
  
  public DownloadService2$ResourceSpec(String paramString1, String paramString2, int paramInt)
  {
    url = paramString1;
    version = paramString2;
    type = paramInt;
    size = -1L;
  }
  
  public String getUrl()
  {
    return url;
  }
  
  public String getVersion()
  {
    return version;
  }
  
  public int getType()
  {
    return type;
  }
  
  public long getSize()
  {
    return size;
  }
  
  public long getLastModified()
  {
    return lastModified;
  }
  
  public long getExpirationDate()
  {
    return expirationDate;
  }
  
  static
  {
    DownloadService2Impl.setResourceSpecAccess(new DownloadService2Impl.ResourceSpecAccess()
    {
      public void setSize(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
      {
        size = paramAnonymousLong;
      }
      
      public void setLastModified(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
      {
        lastModified = paramAnonymousLong;
      }
      
      public void setExpirationDate(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
      {
        expirationDate = paramAnonymousLong;
      }
    });
  }
}

/* Location:
 * Qualified Name:     javax.jnlp.DownloadService2.ResourceSpec
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import com.sun.jnlp.DownloadService2Impl;
import com.sun.jnlp.DownloadService2Impl.ResourceSpecAccess;
import java.io.IOException;

public abstract interface DownloadService2
{
  public static final int ALL = 0;
  public static final int APPLICATION = 1;
  public static final int APPLET = 2;
  public static final int EXTENSION = 3;
  public static final int JAR = 4;
  public static final int IMAGE = 5;
  public static final int CLASS = 6;
  
  public abstract ResourceSpec[] getCachedResources(ResourceSpec paramResourceSpec);
  
  public abstract ResourceSpec[] getUpdateAvailableResources(ResourceSpec paramResourceSpec)
    throws IOException;
  
  public static class ResourceSpec
  {
    private String url;
    private String version;
    private int type;
    private long size;
    private long lastModified;
    private long expirationDate;
    
    public ResourceSpec(String paramString1, String paramString2, int paramInt)
    {
      url = paramString1;
      version = paramString2;
      type = paramInt;
      size = -1L;
    }
    
    public String getUrl()
    {
      return url;
    }
    
    public String getVersion()
    {
      return version;
    }
    
    public int getType()
    {
      return type;
    }
    
    public long getSize()
    {
      return size;
    }
    
    public long getLastModified()
    {
      return lastModified;
    }
    
    public long getExpirationDate()
    {
      return expirationDate;
    }
    
    static
    {
      DownloadService2Impl.setResourceSpecAccess(new DownloadService2Impl.ResourceSpecAccess()
      {
        public void setSize(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
        {
          size = paramAnonymousLong;
        }
        
        public void setLastModified(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
        {
          lastModified = paramAnonymousLong;
        }
        
        public void setExpirationDate(DownloadService2.ResourceSpec paramAnonymousResourceSpec, long paramAnonymousLong)
        {
          expirationDate = paramAnonymousLong;
        }
      });
    }
  }
}

/* Location:
 * Qualified Name:     javax.jnlp.DownloadService2
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.net.URL;

public abstract interface DownloadServiceListener
{
  public abstract void progress(URL paramURL, String paramString, long paramLong1, long paramLong2, int paramInt);
  
  public abstract void validating(URL paramURL, String paramString, long paramLong1, long paramLong2, int paramInt);
  
  public abstract void upgradingArchive(URL paramURL, String paramString, int paramInt1, int paramInt2);
  
  public abstract void downloadFailed(URL paramURL, String paramString);
}

/* Location:
 * Qualified Name:     javax.jnlp.DownloadServiceListener
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.File;
import java.io.IOException;

public abstract interface ExtendedService
{
  public abstract FileContents openFile(File paramFile)
    throws IOException;
  
  public abstract FileContents[] openFiles(File[] paramArrayOfFile)
    throws IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.ExtendedService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.net.URL;

public abstract interface ExtensionInstallerService
{
  public abstract String getInstallPath();
  
  public abstract String getExtensionVersion();
  
  public abstract URL getExtensionLocation();
  
  public abstract void hideProgressBar();
  
  public abstract void hideStatusWindow();
  
  public abstract void setHeading(String paramString);
  
  public abstract void setStatus(String paramString);
  
  public abstract void updateProgress(int paramInt);
  
  public abstract void installSucceeded(boolean paramBoolean);
  
  public abstract void installFailed();
  
  public abstract void setJREInfo(String paramString1, String paramString2);
  
  public abstract void setNativeLibraryInfo(String paramString);
  
  public abstract String getInstalledJRE(URL paramURL, String paramString);
}

/* Location:
 * Qualified Name:     javax.jnlp.ExtensionInstallerService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public abstract interface FileContents
{
  public abstract String getName()
    throws IOException;
  
  public abstract InputStream getInputStream()
    throws IOException;
  
  public abstract OutputStream getOutputStream(boolean paramBoolean)
    throws IOException;
  
  public abstract long getLength()
    throws IOException;
  
  public abstract boolean canRead()
    throws IOException;
  
  public abstract boolean canWrite()
    throws IOException;
  
  public abstract JNLPRandomAccessFile getRandomAccessFile(String paramString)
    throws IOException;
  
  public abstract long getMaxLength()
    throws IOException;
  
  public abstract long setMaxLength(long paramLong)
    throws IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.FileContents
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.IOException;

public abstract interface FileOpenService
{
  public abstract FileContents openFileDialog(String paramString, String[] paramArrayOfString)
    throws IOException;
  
  public abstract FileContents[] openMultiFileDialog(String paramString, String[] paramArrayOfString)
    throws IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.FileOpenService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.IOException;
import java.io.InputStream;

public abstract interface FileSaveService
{
  public abstract FileContents saveFileDialog(String paramString1, String[] paramArrayOfString, InputStream paramInputStream, String paramString2)
    throws IOException;
  
  public abstract FileContents saveAsFileDialog(String paramString, String[] paramArrayOfString, FileContents paramFileContents)
    throws IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.FileSaveService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public abstract interface IntegrationService
{
  public abstract boolean requestShortcut(boolean paramBoolean1, boolean paramBoolean2, String paramString);
  
  public abstract boolean hasDesktopShortcut();
  
  public abstract boolean hasMenuShortcut();
  
  public abstract boolean removeShortcuts();
  
  public abstract boolean requestAssociation(String paramString, String[] paramArrayOfString);
  
  public abstract boolean hasAssociation(String paramString, String[] paramArrayOfString);
  
  public abstract boolean removeAssociation(String paramString, String[] paramArrayOfString);
}

/* Location:
 * Qualified Name:     javax.jnlp.IntegrationService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public abstract interface JNLPRandomAccessFile
  extends DataInput, DataOutput
{
  public abstract void close()
    throws IOException;
  
  public abstract long length()
    throws IOException;
  
  public abstract long getFilePointer()
    throws IOException;
  
  public abstract int read()
    throws IOException;
  
  public abstract int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
    throws IOException;
  
  public abstract int read(byte[] paramArrayOfByte)
    throws IOException;
  
  public abstract void readFully(byte[] paramArrayOfByte)
    throws IOException;
  
  public abstract void readFully(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
    throws IOException;
  
  public abstract int skipBytes(int paramInt)
    throws IOException;
  
  public abstract boolean readBoolean()
    throws IOException;
  
  public abstract byte readByte()
    throws IOException;
  
  public abstract int readUnsignedByte()
    throws IOException;
  
  public abstract short readShort()
    throws IOException;
  
  public abstract int readUnsignedShort()
    throws IOException;
  
  public abstract char readChar()
    throws IOException;
  
  public abstract int readInt()
    throws IOException;
  
  public abstract long readLong()
    throws IOException;
  
  public abstract float readFloat()
    throws IOException;
  
  public abstract double readDouble()
    throws IOException;
  
  public abstract String readLine()
    throws IOException;
  
  public abstract String readUTF()
    throws IOException;
  
  public abstract void seek(long paramLong)
    throws IOException;
  
  public abstract void setLength(long paramLong)
    throws IOException;
  
  public abstract void write(int paramInt)
    throws IOException;
  
  public abstract void write(byte[] paramArrayOfByte)
    throws IOException;
  
  public abstract void write(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
    throws IOException;
  
  public abstract void writeBoolean(boolean paramBoolean)
    throws IOException;
  
  public abstract void writeByte(int paramInt)
    throws IOException;
  
  public abstract void writeShort(int paramInt)
    throws IOException;
  
  public abstract void writeChar(int paramInt)
    throws IOException;
  
  public abstract void writeInt(int paramInt)
    throws IOException;
  
  public abstract void writeLong(long paramLong)
    throws IOException;
  
  public abstract void writeFloat(float paramFloat)
    throws IOException;
  
  public abstract void writeDouble(double paramDouble)
    throws IOException;
  
  public abstract void writeBytes(String paramString)
    throws IOException;
  
  public abstract void writeChars(String paramString)
    throws IOException;
  
  public abstract void writeUTF(String paramString)
    throws IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.JNLPRandomAccessFile
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

public abstract interface PersistenceService
{
  public static final int CACHED = 0;
  public static final int TEMPORARY = 1;
  public static final int DIRTY = 2;
  
  public abstract long create(URL paramURL, long paramLong)
    throws MalformedURLException, IOException;
  
  public abstract FileContents get(URL paramURL)
    throws MalformedURLException, IOException, FileNotFoundException;
  
  public abstract void delete(URL paramURL)
    throws MalformedURLException, IOException;
  
  public abstract String[] getNames(URL paramURL)
    throws MalformedURLException, IOException;
  
  public abstract int getTag(URL paramURL)
    throws MalformedURLException, IOException;
  
  public abstract void setTag(URL paramURL, int paramInt)
    throws MalformedURLException, IOException;
}

/* Location:
 * Qualified Name:     javax.jnlp.PersistenceService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

import java.awt.print.PageFormat;
import java.awt.print.Pageable;
import java.awt.print.Printable;

public abstract interface PrintService
{
  public abstract PageFormat getDefaultPage();
  
  public abstract PageFormat showPageFormatDialog(PageFormat paramPageFormat);
  
  public abstract boolean print(Pageable paramPageable);
  
  public abstract boolean print(Printable paramPrintable);
}

/* Location:
 * Qualified Name:     javax.jnlp.PrintService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public final class ServiceManager
{
  private static ServiceManagerStub _stub = null;
  
  public static Object lookup(String paramString)
    throws UnavailableServiceException
  {
    if (_stub != null) {
      return _stub.lookup(paramString);
    }
    throw new UnavailableServiceException("uninitialized");
  }
  
  public static String[] getServiceNames()
  {
    if (_stub != null) {
      return _stub.getServiceNames();
    }
    return null;
  }
  
  public static synchronized void setServiceManagerStub(ServiceManagerStub paramServiceManagerStub)
  {
    if (_stub == null) {
      _stub = paramServiceManagerStub;
    }
  }
}

/* Location:
 * Qualified Name:     javax.jnlp.ServiceManager
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public abstract interface ServiceManagerStub
{
  public abstract Object lookup(String paramString)
    throws UnavailableServiceException;
  
  public abstract String[] getServiceNames();
}

/* Location:
 * Qualified Name:     javax.jnlp.ServiceManagerStub
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public abstract interface SingleInstanceListener
{
  public abstract void newActivation(String[] paramArrayOfString);
}

/* Location:
 * Qualified Name:     javax.jnlp.SingleInstanceListener
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public abstract interface SingleInstanceService
{
  public abstract void addSingleInstanceListener(SingleInstanceListener paramSingleInstanceListener);
  
  public abstract void removeSingleInstanceListener(SingleInstanceListener paramSingleInstanceListener);
}

/* Location:
 * Qualified Name:     javax.jnlp.SingleInstanceService
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package javax.jnlp;

public class UnavailableServiceException
  extends Exception
{
  public UnavailableServiceException() {}
  
  public UnavailableServiceException(String paramString)
  {
    super(paramString);
  }
}

/* Location:
 * Qualified Name:     javax.jnlp.UnavailableServiceException
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javaws;

import java.net.URL;

public abstract class BrowserSupport
{
  private static BrowserSupport _browserSupportImplementation = null;
  
  public static synchronized BrowserSupport getInstance()
  {
    if (_browserSupportImplementation == null) {
      _browserSupportImplementation = BrowserSupportFactory.newInstance();
    }
    return _browserSupportImplementation;
  }
  
  public static boolean isWebBrowserSupported()
  {
    return getInstance().isWebBrowserSupportedImpl();
  }
  
  public static boolean showDocument(URL paramURL)
  {
    return getInstance().showDocumentImpl(paramURL);
  }
  
  public abstract boolean isWebBrowserSupportedImpl();
  
  public abstract boolean showDocumentImpl(URL paramURL);
  
  public abstract String getNS6MailCapInfo();
  
  public abstract OperaSupport getOperaSupport();
}

/* Location:
 * Qualified Name:     com.sun.javaws.BrowserSupport
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javaws;

public class BrowserSupportFactory
{
  public static BrowserSupport newInstance()
  {
    return new WinBrowserSupport();
  }
}

/* Location:
 * Qualified Name:     com.sun.javaws.BrowserSupportFactory
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javaws;

import java.io.File;
import java.io.FilenameFilter;

final class CacheUpdateHelper$1
  implements FilenameFilter
{
  private final String val$prefix;
  
  CacheUpdateHelper$1(String paramString)
  {
    val$prefix = paramString;
  }
  
  public boolean accept(File paramFile, String paramString)
  {
    try
    {
      if (new File(paramFile, paramString).isDirectory()) {
        return !paramString.startsWith("RN");
      }
    }
    catch (Exception localException)
    {
      return false;
    }
    return paramString.startsWith(val$prefix);
  }
}

/* Location:
 * Qualified Name:     com.sun.javaws.CacheUpdateHelper.1
 * Java Class Version: 1.3 (47.0)
 * JD-Core Version:    0.7.1
 */
package com.sun.javaws;

import com.sun.deploy.Environment;
import com.sun.deploy.cache.Cache;
import com.sun.deploy.cache.LocalApplicationProperties;
import com.sun.deploy.config.Config;
import com.sun.deploy.ui.CacheUpdateProgressDialog;
import com.sun.deploy.ui.CacheUpdateProgressDialog.CanceledException;
import com.sun.deploy.util.Trace;
import com.sun.deploy.util.URLUtil;
import com.sun.javaws.jnl.LaunchDesc;
import com.sun.javaws.jnl.LaunchDescFactory;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Properties;
import java.util.StringTokenizer;

public class CacheUpdateHelper
{
  private static final char DIRECTORY_TYPE = 'D';
  private static final char TEMP_TYPE = 'X';
  private static final char VERSION_TYPE = 'V';
  private static final char INDIRECT_TYPE = 'I';
  private static final char RESOURCE_TYPE = 'R';
  private static final char APPLICATION_TYPE = 'A';
  private static final char EXTENSION_TYPE = 'E';
  private static final char MUFFIN_TYPE = 'P';
  private static final char MAIN_FILE_TAG = 'M';
  private static final char NATIVELIB_FILE_TAG = 'N';
  private static final char TIMESTAMP_FILE_TAG = 'T';
  private static final char CERTIFICATE_FILE_TAG = 'C';
  private static final char LAP_FILE_TAG = 'L';
  private static final char MAPPED_IMAGE_FILE_TAG = 'B';
  private static final char MUFFIN_ATTR_FILE_TAG = 'U';
  private static final String MUFFIN_PREFIX = "PM";
  private static final String MUFFIN_ATTRIBUTE_PREFIX = "PU";
  private static final String APP_PREFIX = "AM";
  private static final String EXT_PREFIX = "XM";
  private static final String LAP_PREFIX = "AL";
  private static final String JAR_PREFIX = "RM";
  private static final String NATIVE_PREFIX = "RN";
  private static final String DIR_PREFIX = "DM";
  private static final DateFormat _df = ;
  private static final LocalInstallHandler _lih = LocalInstallHandler.getInstance();
  
  public static boolean updateCache()
  {
    String str1 = Config.getOldJavawsCacheDir();
    File localFile1 = new File(str1);
    File localFile2 = Cache.getCacheDir();
    try
    {
      if ((localFile1.exists()) && (localFile1.isDirectory()) && (!localFile1.equals(localFile2)))
      {
        CacheUpdateProgressDialog.showProgress(0, 100);
        Cache.setCleanupEnabled(false);
        File localFile3 = new File(localFile1, "splash");
        File localFile4 = new File(localFile2, "splash");
        copyDir(localFile3, localFile4);
        File localFile5 = new File(localFile1, "muffins");
        if ((localFile5.exists()) && (localFile5.isDirectory()))
        {
          localObject1 = findFiles(localFile5, "PM");
          for (int i = 0; i < localObject1.length; i++) {
            try
            {
              String str2 = localObject1[i].getName().substring(2);
              localObject3 = new File(localObject1[i].getParentFile(), "PU" + str2);
              if (((File)localObject3).exists())
              {
                localObject4 = getMuffinAttributes((File)localObject3);
                URL localURL = deriveURL(localFile5, localObject1[i], null);
                if (localURL != null) {
                  Cache.insertMuffin(localURL, localObject1[i], (int)localObject4[0], localObject4[1]);
                }
              }
            }
            catch (Exception localException)
            {
              Trace.ignored(localException);
            }
          }
        }
        Object localObject1 = new File(localFile1, "removed.apps");
        if (((File)localObject1).exists())
        {
          localObject2 = new File(localFile2, "removed.apps");
          try
          {
            Cache.copyFile((File)localObject1, (File)localObject2);
          }
          catch (IOException localIOException)
          {
            Trace.ignored(localIOException);
          }
        }
        Object localObject2 = findFiles(localFile1, "AM");
        File[] arrayOfFile = findFiles(localFile1, "XM");
        Object localObject3 = findFiles(localFile1, "RM");
        Object localObject4 = findFiles(localFile1, "RN");
        int j = localObject2.length + arrayOfFile.length + localObject3.length + localObject4.length;
        int k = 0;
        for (int m = 0; m < localObject2.length; m++)
        {
          updateJnlpFile(localObject2[m], localFile1, localFile2, false);
          k++;
          CacheUpdateProgressDialog.showProgress(k, j);
        }
        for (m = 0; m < arrayOfFile.length; m++)
        {
          updateJnlpFile(arrayOfFile[m], localFile1, localFile2, true);
          k++;
          CacheUpdateProgressDialog.showProgress(k, j);
        }
        for (m = 0; m < localObject3.length; m++)
        {
          String str3 = localObject3[m].getParent();
          String str4 = localObject3[m].getName();
          String str5 = str4.replaceFirst("RM", "RN");
          boolean bool = new File(str3, str5).exists();
          updateJarFile(localObject3[m], localFile1, localFile2, bool);
          k++;
          CacheUpdateProgressDialog.showProgress(k, j);
        }
      }
    }
    catch (CacheUpdateProgressDialog.CanceledException localCanceledException) {}catch (Throwable localThrowable)
    {
      Trace.ignored(localThrowable);
    }
    finally
    {
      CacheUpdateProgressDialog.dismiss();
      Cache.setCleanupEnabled(true);
    }
    Config.setProperty("deployment.javaws.cachedir", null);
    return true;
  }
  
  private static void updateJnlpFile(File paramFile1, File paramFile2, File paramFile3, boolean paramBoolean)
  {
    String[] arrayOfString = new String[1];
    URL localURL = deriveURL(paramFile2, paramFile1, arrayOfString);
    if (localURL != null) {
      try
      {
        long l = getTimeStamp(paramFile1);
        int i = 1;
        Cache.insertFile(paramFile1, i, localURL, arrayOfString[0], l, 0L);
        String str = paramFile1.getName().substring(2);
        File localFile = new File(paramFile1.getParentFile(), "AL" + str);
        if (localFile.exists())
        {
          Properties localProperties = new Properties();
          BufferedInputStream localBufferedInputStream = new BufferedInputStream(new FileInputStream(localFile));
          localProperties.load(localBufferedInputStream);
          localBufferedInputStream.close();
          updateLapFile(paramFile1, localProperties, localURL, arrayOfString[0], paramBoolean);
        }
      }
      catch (Exception localException)
      {
        Trace.ignored(localException);
      }
    }
  }
  
  private static void updateJarFile(File paramFile1, File paramFile2, File paramFile3, boolean paramBoolean)
  {
    String[] arrayOfString = new String[1];
    URL localURL = deriveURL(paramFile2, paramFile1, arrayOfString);
    if (localURL != null) {
      try
      {
        long l = getTimeStamp(paramFile1);
        int i = 256;
        if (paramBoolean) {
          i |= 0x10;
        }
        Cache.insertFile(paramFile1, i, localURL, arrayOfString[0], l, 0L);
      }
      catch (Exception localException)
      {
        Trace.ignored(localException);
      }
    }
  }
  
  private static void updateLapFile(File paramFile, Properties paramProperties, URL paramURL, String paramString, boolean paramBoolean)
  {
    LocalApplicationProperties localLocalApplicationProperties = Cache.getLocalApplicationProperties(paramURL, paramString, !paramBoolean);
    String str1 = paramProperties.getProperty("_default.lastAccessed");
    Date localDate = new Date();
    if (str1 != null) {
      try
      {
        localDate = _df.parse(str1);
      }
      catch (Exception localException1) {}
    }
    localLocalApplicationProperties.setLastAccessed(localDate);
    String str2 = paramProperties.getProperty("_default.launchCount");
    if ((str2 != null) && (str2 != "0")) {
      localLocalApplicationProperties.incrementLaunchCount();
    }
    localLocalApplicationProperties.setAskedForInstall(true);
    String str3 = paramProperties.getProperty("_default.locallyInstalled");
    String str4 = paramProperties.getProperty("_default.title");
    if (str4 != null) {
      Config.getInstance().addRemoveProgramsRemove(str4, false);
    }
    String str5 = paramProperties.getProperty("_default.mime.types.");
    String str6 = paramProperties.getProperty("_default.extensions.");
    try
    {
      if (paramBoolean)
      {
        if (str3 == null) {}
      }
      else
      {
        LaunchDesc localLaunchDesc = LaunchDescFactory.buildDescriptor(paramFile, URLUtil.getBase(paramURL), null, paramURL);
        if ((str3 != null) && (str3.equalsIgnoreCase("true")))
        {
          boolean bool1 = false;
          boolean bool2 = false;
          String str7 = paramProperties.getProperty("windows.installedDesktopShortcut");
          if (str7 != null) {
            bool2 = _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("windows.installedStartMenuShortcut");
          if (str7 != null) {
            bool1 = _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("windows.uninstalledStartMenuShortcut");
          if (str7 != null) {
            _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("windows.RContent.shortcuts");
          if (str7 != null) {
            _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("unix.installedDesktopShortcut");
          if (str7 != null) {
            bool2 = _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("unix.installedDirectoryFile");
          if (str7 != null) {
            _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("unix.gnome.installedStartMenuShortcut");
          if (str7 != null) {
            bool1 = _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("unix.gnome.installedUninstallShortcut");
          if (str7 != null) {
            _lih.removeShortcuts(str7);
          }
          str7 = paramProperties.getProperty("unix.gnome.installedRCShortcut");
          if (str7 != null) {
            _lih.removeShortcuts(str7);
          }
          if ((bool2) || (bool1)) {
            _lih.reinstallShortcuts(localLaunchDesc, localLocalApplicationProperties, bool2, bool1);
          }
        }
        if ((str5 != null) || (str6 != null))
        {
          _lih.removeAssociations(str5, str6);
          _lih.reinstallAssociations(localLaunchDesc, localLocalApplicationProperties);
        }
        _lih.removeFromInstallPanel(localLaunchDesc, localLocalApplicationProperties);
        _lih.registerWithInstallPanel(localLaunchDesc, localLocalApplicationProperties);
      }
      return;
    }
    catch (Exception localException2)
    {
      Trace.ignored(localException2);
    }
    finally
    {
      try
      {
        localLocalApplicationProperties.store();
      }
      catch (IOException localIOException3)
      {
        Trace.ignoredException(localIOException3);
      }
    }
  }
  
  private static long getTimeStamp(File paramFile)
  {
    try
    {
      String str1 = paramFile.getName();
      if (str1.charAt(1) == 'M')
      {
        str1 = str1.replaceFirst("M", "T");
        File localFile = new File(paramFile.getParentFile(), str1);
        BufferedReader localBufferedReader = null;
        try
        {
          FileInputStream localFileInputStream = new FileInputStream(localFile);
          localBufferedReader = new BufferedReader(new InputStreamReader(localFileInputStream));
          String str2 = localBufferedReader.readLine();
          try
          {
            long l2 = Long.parseLong(str2);
            return l2;
          }
          catch (NumberFormatException localNumberFormatException)
          {
            long l3 = 0L;
            return l3;
          }
        }
        catch (IOException localIOException1)
        {
          long l1 = 0L;
          return l1;
        }
        finally
        {
          try
          {
            if (localBufferedReader != null) {
              localBufferedReader.close();
            }
          }
          catch (IOException localIOException5)
          {
            Trace.ignoredException(localIOException5);
          }
        }
      }
      return 0L;
    }
    catch (Exception localException) {}
  }
  
  private static URL deriveURL(File paramFile1, File paramFile2, String[] paramArrayOfString)
  {
    String str1 = paramFile2.toString().substring(paramFile1.toString().length() + 1);
    StringTokenizer localStringTokenizer = new StringTokenizer(str1, File.separator);
    try
    {
      String str2 = localStringTokenizer.nextToken();
      if ((str2.equals("http")) || (str2.equals("https")))
      {
        String str3 = "/";
        String str4 = localStringTokenizer.nextToken().substring(1);
        int i = new Integer(localStringTokenizer.nextToken().substring(1)).intValue();
        String str5 = localStringTokenizer.nextToken();
        if (str5.startsWith("V")) {
          paramArrayOfString[0] = str5.substring(1);
        }
        for (str5 = localStringTokenizer.nextToken(); str5.startsWith("DM"); str5 = localStringTokenizer.nextToken()) {
          str3 = str3 + str5.substring(2) + "/";
        }
        str3 = str3 + str5.substring(2);
        if (i == 80) {
          i = -1;
        }
        return new URL(str2, str4, i, str3);
      }
    }
    catch (Exception localException)
    {
      Trace.ignored(localException);
    }
    return null;
  }
  
  private static void copyDir(File paramFile1, File paramFile2)
  {
    if ((paramFile1.exists()) && (paramFile1.isDirectory()))
    {
      paramFile2.mkdirs();
      File[] arrayOfFile = paramFile1.listFiles();
      for (int i = 0; i < arrayOfFile.length; i++)
      {
        File localFile = new File(paramFile2, arrayOfFile[i].getName());
        if (arrayOfFile[i].isDirectory()) {
          copyDir(arrayOfFile[i], localFile);
        } else if (!localFile.exists()) {
          try
          {
            Cache.copyFile(arrayOfFile[i], localFile);
          }
          catch (IOException localIOException)
          {
            Trace.ignored(localIOException);
          }
        }
      }
    }
  }
  
  private static File[] findFiles(File paramFile, String paramString)
  {
    ArrayList localArrayList = new ArrayList();
    String[] arrayOfString = paramFile.list(new FilenameFilter()
    {
      private final String val$prefix;
      
      public boolean accept(File paramAnonymousFile, String paramAnonymousString)
      {
        try
        {
          if (new File(paramAnonymousFile, paramAnonymousString).isDirectory()) {
            return !paramAnonymousString.startsWith("RN");
          }
        }
        catch (Exception localException)
        {
          return false;
        }
        return paramAnonymousString.startsWith(val$prefix);
      }
    });
    for (int i = 0; i < arrayOfString.length; i++) {
      if (arrayOfString[i].startsWith(paramString))
      {
        localArrayList.add(new File(paramFile, arrayOfString[i]));
      }
      else
      {
        File localFile = new File(paramFile, arrayOfString[i]);
        File[] arrayOfFile = findFiles(localFile, paramString);
        for (int j = 0; j < arrayOfFile.length; j++) {
          localArrayList.add(arrayOfFile[j]);
        }
      }
    }
    return (File[])localArrayList.toArray(new File[0]);
  }
  
  private static long[] getMuffinAttributes(File paramFile)
    throws IOException
  {
    BufferedReader localBufferedReader = null;
    long l1 = -1L;
    long l2 = -1L;
    try
    {
      FileInputStream localFileInputStream = new FileInputStream(paramFile);
      localBufferedReader = new BufferedReader(new InputStreamReader(localFileInputStream));
      String str = localBufferedReader.readLine();
      try
      {
        l1 = Integer.parseInt(str);
      }
      catch (NumberFormatException localNumberFormatException1)
      {
        throw new IOException(localNumberFormatException1.getMessage());
      }
      str = localBufferedReader.readLine();
      try
      {
        l2 = Long.parseLong(str);
      }
      catch (NumberFormatException localNumberFormatException2)
      {
        throw new IOException(localNumberFormatException2.getMessage());
      }
    }
    finally
    {
      if (localBufferedReader != null) {
        localBufferedReader.close();
      }
    }
    return new long[] { l1, l2 };
  }
  
  public static boolean systemUpdateCheck()
  {
    if (!Environment.isSystemCacheMode()) {
      return false;
    }
    long l = Cache.getLastAccessed(true);
    if (l > 0L) {
      return false;
    }
    String str1 = Config.getSystemCacheDirectory();
    File localFile1 = new File(str1, "javaws");
    File localFile2 = new File(str1, Cache.getCacheVersionString());
    if ((!localFile1.exists()) || (!localFile1.isDirectory())) {
      return false;
    }
    try
    {
      CacheUpdateProgressDialog.setSystemCache(true);
      CacheUpdateProgressDialog.showProgress(0, 100);
      Cache.setCleanupEnabled(false);
      File[] arrayOfFile1 = findFiles(localFile1, "AM");
      File[] arrayOfFile2 = findFiles(localFile1, "XM");
      File[] arrayOfFile3 = findFiles(localFile1, "RM");
      File[] arrayOfFile4 = findFiles(localFile1, "RN");
      int i = arrayOfFile1.length + arrayOfFile2.length + arrayOfFile3.length + arrayOfFile4.length;
      int j = 0;
      for (int k = 0; k < arrayOfFile1.length; k++)
      {
        updateJnlpFile(arrayOfFile1[k], localFile1, localFile2, false);
        j++;
        CacheUpdateProgressDialog.showProgress(j, i);
      }
      for (k = 0; k < arrayOfFile2.length; k++)
      {
        updateJnlpFile(arrayOfFile2[k], localFile1, localFile2, true);
        j++;
        CacheUpdateProgressDialog.showProgress(j, i);
      }
      for (k = 0; k < arrayOfFile3.length; k++)
      {
        String str2 = arrayOfFile3[k].getParent();
        String str3 = arrayOfFile3[k].getName();
        String str4 = str3.replaceFirst("RM", "RN");
        boolean bool = new File(str2, str4).exists();
        updateJarFile(arrayOfFile3[k], localFile1, localFile2, bool);
        j++;
        CacheUpdateProgressDialog.showProgress(j
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd