jxbrowser-3.3

16:38:23.248 INFO  jd.cli.Main - Decompiling jxbrowser-3.3.jar
package com.teamdev.a;

public final class a
{
  private c a;
  private String b;
  
  public a(c paramc, String paramString)
  {
    if (paramc == null) {
      throw new NullPointerException();
    }
    if (paramString == null) {
      throw new NullPointerException();
    }
    a = paramc;
    b = paramString;
  }
  
  public final c a()
  {
    return a;
  }
  
  public final String b()
  {
    return b;
  }
}

/* Location:
 * Qualified Name:     com.teamdev.a.a
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.a;

import java.io.PrintStream;
import java.text.DateFormat;
import java.text.MessageFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;

public class b
{
  public static final SimpleDateFormat a = new SimpleDateFormat("dd-MM-yyyy", Locale.ENGLISH);
  private String c;
  protected String b;
  private d d;
  private long e = 0L;
  private c f = null;
  
  protected b(String paramString1, String paramString2, d paramd)
  {
    b = paramString1;
    c = paramString2;
    d = paramd;
  }
  
  public final synchronized void b()
  {
    try
    {
      Date localDate;
      long l = (localDate = new Date()).getTime();
      if ((e != 0L) && (l - e < 86400000L)) {
        return;
      }
      for (Object localObject1 = (localObject1 = d.a()).iterator(); ((Iterator)localObject1).hasNext();) {
        try
        {
          a locala = (a)((Iterator)localObject1).next();
          Object localObject2 = MessageFormat.format("Checking {0} license {1}:", new Object[] { b, locala.b() });
          a((String)localObject2);
          if (!(localObject2 = locala.a()).b()) {
            throw a(b, "Signature is not valid.");
          }
          a((c)localObject2, localDate);
          f = locala.a();
        }
        catch (RuntimeException localRuntimeException2)
        {
          a(localRuntimeException2);
        }
      }
      if (f == null) {
        throw a(b, "No valid license found.");
      }
      a(MessageFormat.format("{0} license valid.", new Object[] { b }));
      e = l;
      
      return;
    }
    catch (RuntimeException localRuntimeException1)
    {
      a(localRuntimeException1);
      throw localRuntimeException1;
    }
    catch (Error localError)
    {
      a(localError);
      throw localError;
    }
  }
  
  protected void a(c paramc, Date paramDate)
  {
    String str1 = paramc.a("Product");
    String str2 = paramc.a("Version");
    String str3 = paramc.a("Licensed to");
    String str4 = paramc.a("License type");
    Date localDate = b(paramc);
    String str5 = paramc.a("License info");
    String str6 = paramc.a("Product binding");
    String str7 = paramc.b("Product binding info");
    
    long l = localDate != null ? localDate.getTime() : 0L;
    paramc = a(paramc);
    
    a("-- Product name: " + str1);
    a("-- Licensed version: " + str2);
    a("-- Licensed to: " + str3);
    a("-- License type: " + str4);
    if (str6 != null) {
      a("-- License bound to product: " + str6);
    }
    a("-- Generation date: " + a(paramc));
    a("-- Expiration date: " + (localDate != null ? a(localDate) : c.c("1js3qp8y")));
    a("-- License info: " + str5);
    a("-- Current date: " + a(paramDate));
    if (!b.equals(str1)) {
      throw a(b, "Wrong product name.");
    }
    if (!str2.startsWith(c)) {
      throw a(b, "Wrong product version. Required: " + c + "x, found: " + str2 + '.');
    }
    if (str6 != null) {
      try
      {
        Class.forName(str7);
      }
      catch (ClassNotFoundException localClassNotFoundException)
      {
        throw a(b, "This license can only be used with " + str6);
      }
    }
    if ((localDate != null) && (paramDate.getTime() >= l)) {
      throw a(b, "License has expired.");
    }
  }
  
  protected void a(String paramString)
  {
    System.out.println(paramString);
  }
  
  private void a(Throwable paramThrowable)
  {
    try
    {
      a(paramThrowable.getMessage());
    }
    catch (Exception localException)
    {
      System.out.println(paramThrowable.getMessage());
    }
    for (this = paramThrowable; this != null; this = getCause()) {
      setStackTrace(new StackTraceElement[0]);
    }
  }
  
  private static String a(Date paramDate)
  {
    return SimpleDateFormat.getDateInstance(2).format(paramDate);
  }
  
  public static RuntimeException a(String paramString1, String paramString2)
  {
    paramString1 = MessageFormat.format("{0} license check failed: {1}", new Object[] { paramString1, paramString2 });
    
    return new RuntimeException(paramString1);
  }
  
  private Date a(c paramc)
  {
    if ((paramc = paramc.a("Generation date")) == null) {
      throw a(b, "No generation date field found in the license file");
    }
    try
    {
      return a.parse(paramc);
    }
    catch (ParseException localParseException)
    {
      throw a(b, "Couldn't parse license generation date: " + paramc);
    }
  }
  
  private Date b(c paramc)
  {
    if ((paramc = paramc.a("Expiration date")) == null) {
      throw a(b, "No expiration date field found in the license file");
    }
    if (paramc.toUpperCase().equals(c.c("1js3qp8y"))) {
      return null;
    }
    try
    {
      return a.parse(paramc);
    }
    catch (ParseException localParseException)
    {
      throw a(b, "Couldn't parse license expiration date: " + paramc);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.a.b
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.a;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;

public class c
{
  private static final BigInteger a = new BigInteger("34051811835788252902797885733156696286414897221750775263783399829125079614056933876807669964513495918712211128108375406963673");
  private static final BigInteger b = new BigInteger("33851717214292305582010417393402727812830176472733550790920844148355988054130010499992971193003524512509240474673101724848384");
  private static final BigInteger c = new BigInteger("25667112684517379948185296389386925307782598673250742557116530456931377273936147127185145251019629808481495879454212767959902");
  private static final BigInteger d = new BigInteger("1");
  private static final BigInteger e = new BigInteger("0");
  private static final byte[] f = { 120, -7, -64, -10, -27, 104, 124, -25, 102, 30, -19, 18, 71, 99, 64, -9, 66, 83, -126, 115, -75, 22, 106, -32, 48, -61, -39, 104, -119, -116, 5, -57, -57, -18, -46, -111, -14, -40, 8, 120, -82, 121, 18, 24, -83, 68, 60, Byte.MIN_VALUE, 116, 116 };
  private final Map g = new HashMap();
  private final List h = new ArrayList();
  
  public c(InputStream paramInputStream)
  {
    paramInputStream = new BufferedReader(new InputStreamReader(paramInputStream, "UTF-8"));
    a(paramInputStream);
    paramInputStream.close();
  }
  
  protected void a(BufferedReader paramBufferedReader)
  {
    String str1;
    while ((str1 = paramBufferedReader.readLine()) != null)
    {
      int i;
      if ((i = str1.indexOf(":")) == -1) {
        throw e("Invalid license file");
      }
      String str2 = str1.substring(0, i).trim();
      str1 = str1.substring(i + ":".length()).trim();
      a(str2, str1);
    }
  }
  
  public final String a(String paramString)
  {
    paramString = paramString.trim();
    
    return this = (String)g.get(paramString);
  }
  
  protected final void a(String paramString1, String paramString2)
  {
    g.put(paramString1, paramString2);
    h.add(paramString1);
  }
  
  public final String b(String paramString)
  {
    if ((this = a(paramString)) == null) {
      return null;
    }
    return this = c(this);
  }
  
  public static String c(String paramString)
  {
    a(paramString = (paramString = new BigInteger(paramString, 36)).toByteArray());
    try
    {
      return paramString = new String(paramString, "UTF-8");
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException)
    {
      throw e((paramString = localUnsupportedEncodingException).getMessage());
    }
  }
  
  private static void a(byte[] paramArrayOfByte)
  {
    int i = 0;
    for (int j = paramArrayOfByte.length; i < j; i++)
    {
      int tmp12_11 = 0;paramArrayOfByte[tmp12_11] = ((byte)(paramArrayOfByte[tmp12_11] ^ f[(i % f.length)]));
    }
  }
  
  public final boolean b()
  {
    BigInteger localBigInteger1 = new BigInteger(a(c("-7nkkov")), 36);
    BigInteger localBigInteger2 = new BigInteger(a(c("-7nkkou")), 36);
    this = d();
    BigInteger localBigInteger3 = a.subtract(d);
    if ((compareTo(e) < 0) || (compareTo(localBigInteger3) >= 0) || (localBigInteger1.compareTo(e) < 0) || (localBigInteger1.compareTo(localBigInteger3) >= 0) || (localBigInteger2.compareTo(e) < 0) || (localBigInteger2.compareTo(localBigInteger3) >= 0)) {
      this = 0;
    } else {
      this = c.modPow(localBigInteger1, a).multiply(localBigInteger1.modPow(localBigInteger2, a)).mod(a).equals(b.modPow(this, a));
    }
    return this;
  }
  
  protected String a()
  {
    StringBuffer localStringBuffer = new StringBuffer();
    
    this = c();
    while (hasNext())
    {
      String str = (String)(localObject = (Map.Entry)next()).getKey();
      Object localObject = (String)((Map.Entry)localObject).getValue();
      localStringBuffer.append(d(str));
      localStringBuffer.append(d((String)localObject));
    }
    return localStringBuffer.toString();
  }
  
  private Iterator c()
  {
    (this = new TreeMap(g)).remove(c("-7nkkov"));
    remove(c("-7nkkou"));
    
    return this = (this = entrySet()).iterator();
  }
  
  protected static String d(String paramString)
  {
    paramString = paramString.toCharArray();
    StringBuffer localStringBuffer = new StringBuffer(paramString.length);
    for (int i = 0; i < paramString.length; i++)
    {
      char c1;
      if (Character.isLetterOrDigit(c1 = paramString[i])) {
        localStringBuffer.append(c1);
      }
    }
    return localStringBuffer.toString();
  }
  
  private BigInteger d()
  {
    try
    {
      localObject = MessageDigest.getInstance("SHA");
      localObject = a((MessageDigest)localObject);
      this = a().getBytes("UTF-8");
      byte[] arrayOfByte = new byte[50];
      System.arraycopy(localObject, 0, arrayOfByte, 0, localObject.length);
      System.arraycopy(this, 0, arrayOfByte, localObject.length, Math.min(arrayOfByte.length - localObject.length, this.length));
      
      return this = new BigInteger(1, arrayOfByte);
    }
    catch (Exception localException)
    {
      Object localObject;
      throw e((localObject = localException).toString());
    }
  }
  
  protected byte[] a(MessageDigest paramMessageDigest)
  {
    this = c();
    Object localObject;
    while (hasNext())
    {
      String str = (String)(localObject = (Map.Entry)next()).getKey();
      localObject = (String)((Map.Entry)localObject).getValue();
      paramMessageDigest.update(str.getBytes("UTF-8"));
      paramMessageDigest.update(((String)localObject).getBytes("UTF-8"));
    }
    return localObject = paramMessageDigest.digest();
  }
  
  protected static RuntimeException e(String paramString)
  {
    (paramString = new RuntimeException(paramString)).setStackTrace(new StackTraceElement[0]);
    return paramString;
  }
}

/* Location:
 * Qualified Name:     com.teamdev.a.c
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.a;

import java.util.List;

public abstract interface d
{
  public abstract List a();
}

/* Location:
 * Qualified Name:     com.teamdev.a.d
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

final class a
  implements NewWindowContainer
{
  public final void insertBrowser(Browser paramBrowser) {}
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.a
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import com.teamdev.jxbrowser.cache.CacheStorage;
import com.teamdev.jxbrowser.cookie.HttpCookieStorage;
import com.teamdev.jxbrowser.events.BrowserEventsThread;
import com.teamdev.jxbrowser.events.DisposeEvent;
import com.teamdev.jxbrowser.events.DisposeListener;
import com.teamdev.jxbrowser.events.HistoryChangeEvent;
import com.teamdev.jxbrowser.events.HistoryChangeListener;
import com.teamdev.jxbrowser.events.NavigationEvent;
import com.teamdev.jxbrowser.events.NavigationFinishedEvent;
import com.teamdev.jxbrowser.events.NavigationListener;
import com.teamdev.jxbrowser.events.ProgressChangedEvent;
import com.teamdev.jxbrowser.events.ProgressListener;
import com.teamdev.jxbrowser.events.StatusChangedEvent;
import com.teamdev.jxbrowser.events.StatusListener;
import com.teamdev.jxbrowser.events.TitleChangedEvent;
import com.teamdev.jxbrowser.events.TitleListener;
import com.teamdev.jxbrowser.print.PrintListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

public abstract class AbstractBrowser<T>
  implements Browser
{
  private final Set<HistoryChangeListener> a = Collections.synchronizedSet(new HashSet());
  private final Set<NavigationListener> b = Collections.synchronizedSet(new HashSet());
  private final Set<ProgressListener> c = Collections.synchronizedSet(new HashSet());
  private final Set<DisposeListener> d = Collections.synchronizedSet(new HashSet());
  private final Set<StatusListener> e = Collections.synchronizedSet(new HashSet());
  private final Set<TitleListener> f = Collections.synchronizedSet(new HashSet());
  private final BrowserEventsThread g = new BrowserEventsThread();
  
  public void dispose()
  {
    g.dispose();
  }
  
  public void addNavigationListener(NavigationListener paramNavigationListener)
  {
    b.add(paramNavigationListener);
  }
  
  public void addProgressListener(ProgressListener paramProgressListener)
  {
    c.add(paramProgressListener);
  }
  
  public void addStatusListener(StatusListener paramStatusListener)
  {
    e.add(paramStatusListener);
  }
  
  public void removeNavigationListener(NavigationListener paramNavigationListener)
  {
    b.remove(paramNavigationListener);
  }
  
  public void removeProgressListener(ProgressListener paramProgressListener)
  {
    c.remove(paramProgressListener);
  }
  
  public void removeStatusListener(StatusListener paramStatusListener)
  {
    e.remove(paramStatusListener);
  }
  
  public void addTitleListener(TitleListener paramTitleListener)
  {
    f.add(paramTitleListener);
  }
  
  public void removeTitleListener(TitleListener paramTitleListener)
  {
    f.remove(paramTitleListener);
  }
  
  public List<NavigationListener> getNavigationListeners()
  {
    return new ArrayList(b);
  }
  
  public List<ProgressListener> getProgressListeners()
  {
    return new ArrayList(c);
  }
  
  public List<StatusListener> getStatusListeners()
  {
    return new ArrayList(e);
  }
  
  public List<TitleListener> getTitleListeners()
  {
    return new ArrayList(f);
  }
  
  public void addDisposeListener(DisposeListener paramDisposeListener)
  {
    d.add(paramDisposeListener);
  }
  
  public void removeDisposeListener(DisposeListener paramDisposeListener)
  {
    d.remove(paramDisposeListener);
  }
  
  public List<DisposeListener> getDisposeListeners()
  {
    return new ArrayList(d);
  }
  
  public void addHistoryChangeListener(HistoryChangeListener paramHistoryChangeListener)
  {
    a.add(paramHistoryChangeListener);
  }
  
  public List<HistoryChangeListener> getHistoryChangeListeners()
  {
    return new ArrayList(a);
  }
  
  public void removeHistoryChangeListener(HistoryChangeListener paramHistoryChangeListener)
  {
    a.remove(paramHistoryChangeListener);
  }
  
  public BrowserServices getServices()
  {
    return BrowserServices.getInstance();
  }
  
  public HttpCookieStorage getCookieStorage()
  {
    return BrowserServices.getInstance().getCookieStorage(getType());
  }
  
  public CacheStorage getCacheStorage()
  {
    return BrowserServices.getInstance().getCacheStorage(getType());
  }
  
  public NewWindowManager getNewWindowManager()
  {
    return getServices().getNewWindowManager();
  }
  
  public abstract boolean isReady();
  
  public void waitReady()
  {
    int i = 450;
    while ((!isReady()) && (i-- > 0)) {
      try
      {
        Thread.sleep(100L);
      }
      catch (InterruptedException this)
      {
        throw new RuntimeException(this);
      }
    }
  }
  
  public abstract T getPeer();
  
  public void print()
  {
    throw new UnsupportedOperationException();
  }
  
  public void print(PrintListener paramPrintListener)
  {
    throw new UnsupportedOperationException();
  }
  
  public void notifyListeners(ProgressChangedEvent paramProgressChangedEvent)
  {
    Object localObject = (localObject = getProgressListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      ProgressListener localProgressListener = (ProgressListener)((Iterator)localObject).next();
      g.invokeLater(new j(this, localProgressListener, paramProgressChangedEvent));
    }
  }
  
  public void notifyListeners(StatusChangedEvent paramStatusChangedEvent)
  {
    Object localObject = (localObject = getStatusListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      StatusListener localStatusListener = (StatusListener)((Iterator)localObject).next();
      g.invokeLater(new h(this, localStatusListener, paramStatusChangedEvent));
    }
  }
  
  public void notifyListeners(NavigationFinishedEvent paramNavigationFinishedEvent)
  {
    Object localObject = (localObject = getNavigationListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      NavigationListener localNavigationListener = (NavigationListener)((Iterator)localObject).next();
      g.invokeLater(new i(this, localNavigationListener, paramNavigationFinishedEvent));
    }
  }
  
  public void notifyListeners(NavigationEvent paramNavigationEvent)
  {
    Object localObject = (localObject = getNavigationListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      NavigationListener localNavigationListener = (NavigationListener)((Iterator)localObject).next();
      g.invokeLater(new f(this, localNavigationListener, paramNavigationEvent));
    }
  }
  
  public void notifyListeners(TitleChangedEvent paramTitleChangedEvent)
  {
    Object localObject = (localObject = getTitleListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      TitleListener localTitleListener = (TitleListener)((Iterator)localObject).next();
      g.invokeLater(new g(this, localTitleListener, paramTitleChangedEvent));
    }
  }
  
  public void notifyListeners(DisposeEvent paramDisposeEvent)
  {
    this = (this = getDisposeListeners()).iterator();
    while (hasNext())
    {
      DisposeListener localDisposeListener;
      (localDisposeListener = (DisposeListener)next()).browserDisposed(paramDisposeEvent);
    }
  }
  
  public void notifyListeners(HistoryChangeEvent paramHistoryChangeEvent)
  {
    Object localObject = (localObject = getHistoryChangeListeners()).iterator();
    while (((Iterator)localObject).hasNext())
    {
      HistoryChangeListener localHistoryChangeListener = (HistoryChangeListener)((Iterator)localObject).next();
      g.invokeLater(new e(this, localHistoryChangeListener, paramHistoryChangeEvent));
    }
  }
  
  protected BrowserEventsThread getEventsThread()
  {
    return g;
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.AbstractBrowser
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import javax.swing.JFrame;

final class b
  implements Runnable
{
  b(m paramm) {}
  
  public final void run()
  {
    DefaultNewWindowManager.a.a(a.a.b).dispose();
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.b
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import com.teamdev.jxbrowser.cache.CacheStorage;
import com.teamdev.jxbrowser.cookie.HttpCookieStorage;
import com.teamdev.jxbrowser.print.Printing;
import com.teamdev.jxbrowser.security.Security;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Image;
import org.w3c.dom.Document;

public abstract interface Browser
  extends ContentLoading, Disposable, Navigation, NavigationHistory, PageHost, ScriptRunner, Printing, Security
{
  public abstract void setContent(String paramString);
  
  public abstract void setContent(String paramString1, String paramString2);
  
  public abstract String getContent();
  
  public abstract BrowserType getType();
  
  public abstract Component getComponent();
  
  public abstract Document getDocument();
  
  public abstract Image toImage(boolean paramBoolean);
  
  public abstract Image toImage(Dimension paramDimension);
  
  public abstract NewWindowManager getNewWindowManager();
  
  public abstract BrowserServices getServices();
  
  public abstract HttpCookieStorage getCookieStorage();
  
  public abstract Configurable getConfigurable();
  
  public abstract void setUserAgent(String paramString);
  
  public abstract CacheStorage getCacheStorage();
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.Browser
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import java.io.InputStream;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class BrowserFactory
{
  private static final Logger a = LoggerFactory.getLogger(BrowserFactory.class);
  private static BrowserType b = BrowserType.getPlatformSpecificBrowser();
  
  protected abstract Browser create();
  
  public static Browser createBrowser(BrowserType paramBrowserType)
  {
    Object localObject1;
    if (!paramBrowserType.isSupported())
    {
      localObject1 = Environment.getInstance().getInfo();
      throw new UnsupportedBrowserTypeException(paramBrowserType, paramBrowserType + " engine doesn't support current environment: " + (String)localObject1);
    }
    try
    {
      localObject1 = paramBrowserType;
      localObject2 = new Properties();
      localObject1 = localObject1.getClass().getResourceAsStream("engine.properties");
      ((Properties)localObject2).load((InputStream)localObject1);
      localObject1 = (BrowserFactory)(localObject1 = (localObject1 = Class.forName(localObject1 = ((Properties)localObject2).getProperty("browser.factory.class.name"))).asSubclass(BrowserFactory.class)).newInstance();
    }
    catch (Exception localException)
    {
      Object localObject2;
      (localObject2 = new StringBuilder()).append("Cannot create ").append(paramBrowserType).append(" Browser instance on ");
      ((StringBuilder)localObject2).append(Environment.getInstance().getInfo());
      a.error(((StringBuilder)localObject2).toString(), localException);
      throw new RuntimeException(((StringBuilder)localObject2).toString(), localException);
    }
    return localException.create();
  }
  
  public static Browser createBrowser()
  {
    return createBrowser(b);
  }
  
  public static void setDefaultBrowserType(BrowserType paramBrowserType)
  {
    b = paramBrowserType;
  }
  
  public static BrowserType getDefaultBrowserType()
  {
    return b;
  }
  
  static
  {
    d.a().b();
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.BrowserFactory
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

public abstract interface BrowserFunction
{
  public abstract Object invoke(Object... paramVarArgs);
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.BrowserFunction
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import com.teamdev.jxbrowser.cache.CacheStorage;
import com.teamdev.jxbrowser.cookie.HttpCookieStorage;
import com.teamdev.jxbrowser.prompt.DefaultPromptService;
import com.teamdev.jxbrowser.prompt.PromptService;
import com.teamdev.jxbrowser.proxy.ProxyConfig;
import com.teamdev.jxbrowser.proxy.impl.CommonProxyConfig;
import com.teamdev.jxbrowser.script.ScriptErrorWatcher;

public final class BrowserServices
{
  private static BrowserServices a;
  private PromptService b = new DefaultPromptService();
  private NewWindowManager c = new DefaultNewWindowManager();
  private WebPolicyDelegate d = new DefaultWebPolicyDelegate();
  private ScriptErrorWatcher e = new ScriptErrorWatcher();
  private final ProxyConfig f = new CommonProxyConfig();
  
  public static BrowserServices getInstance()
  {
    if (null == a) {
      synchronized (BrowserServices.class)
      {
        if (null == a) {
          a = new BrowserServices();
        }
      }
    }
    return a;
  }
  
  public final ProxyConfig getProxyConfig()
  {
    return f;
  }
  
  public final NewWindowManager getNewWindowManager()
  {
    return c;
  }
  
  public final void setNewWindowManager(NewWindowManager paramNewWindowManager)
  {
    c = paramNewWindowManager;
  }
  
  public final PromptService getPromptService()
  {
    return b;
  }
  
  public final void setPromptService(PromptService paramPromptService)
  {
    b = paramPromptService;
  }
  
  public final ScriptErrorWatcher getScriptErrorWatcher()
  {
    return e;
  }
  
  public final WebPolicyDelegate getWebPolicyDelegate()
  {
    return d;
  }
  
  public final void setWebPolicyDelegate(WebPolicyDelegate paramWebPolicyDelegate)
  {
    d = paramWebPolicyDelegate;
  }
  
  public final HttpCookieStorage getCookieStorage(BrowserType paramBrowserType)
  {
    return HttpCookieStorage.getInstance(paramBrowserType);
  }
  
  public final CacheStorage getCacheStorage(BrowserType paramBrowserType)
  {
    return CacheStorage.getInstance(paramBrowserType);
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.BrowserServices
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import com.jniwrapper.PlatformContext;
import java.lang.reflect.Field;

public abstract class BrowserType
{
  public static final BrowserType IE = create("com.teamdev.jxbrowser.ie.IEBrowserType");
  public static final BrowserType Mozilla = create("com.teamdev.jxbrowser.mozilla.MozillaBrowserType");
  public static final BrowserType Mozilla15 = create("com.teamdev.jxbrowser.mozilla15.MozillaBrowserType");
  public static final BrowserType Safari = create("com.teamdev.jxbrowser.safari.SafariBrowserType");
  
  public abstract boolean isSupported();
  
  public abstract String getName();
  
  public static BrowserType getPlatformSpecificBrowser()
  {
    if (PlatformContext.isWindows()) {
      return IE;
    }
    if (PlatformContext.isLinux()) {
      return Mozilla;
    }
    if (PlatformContext.isMacOS()) {
      return Safari;
    }
    return getCrossPlatformBrowser();
  }
  
  public static BrowserType getCrossPlatformBrowser()
  {
    return Mozilla;
  }
  
  public static BrowserType create(String paramString)
  {
    try
    {
      return (BrowserType)(paramString = (paramString = Class.forName(paramString)).asSubclass(BrowserType.class)).newInstance();
    }
    catch (Exception localException) {}
    return new UnsupportedBrowserType();
  }
  
  public String toString()
  {
    return getName();
  }
  
  public static BrowserType valueOf(String paramString)
  {
    if (paramString == null) {
      throw new NullPointerException("Name is null.");
    }
    Field[] arrayOfField;
    int i = (arrayOfField = arrayOfField = BrowserType.class.getDeclaredFields()).length;
    for (int j = 0; j < i; j++)
    {
      Field localField;
      String str;
      if ((str = (localField = arrayOfField[j]).getName()).equals(paramString)) {
        try
        {
          return (BrowserType)localField.get(null);
        }
        catch (IllegalAccessException paramString)
        {
          throw new RuntimeException(paramString);
        }
      }
    }
    throw new IllegalArgumentException("No constant with the '" + paramString + "' name");
  }
  
  public static BrowserType[] values()
  {
    Field[] arrayOfField;
    BrowserType[] arrayOfBrowserType = new BrowserType[(arrayOfField = BrowserType.class.getDeclaredFields()).length];
    for (int i = 0; i < arrayOfField.length; i++)
    {
      Field localField = arrayOfField[i];
      try
      {
        arrayOfBrowserType[i] = ((BrowserType)localField.get(null));
      }
      catch (IllegalAccessException localIllegalAccessException)
      {
        throw new RuntimeException(localIllegalAccessException);
      }
    }
    return arrayOfBrowserType;
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.BrowserType
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

final class c$a {}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.c.a
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import java.io.File;
import java.net.URL;

final class c$b
{
  private String a;
  private URL b;
  private File c;
  private String d;
  
  private c$b(String paramString, URL paramURL)
  {
    if (paramString == null) {
      throw new NullPointerException();
    }
    a = paramString;
    if (paramURL == null) {
      throw new NullPointerException();
    }
    b = paramURL;
    d = paramURL.toString();
  }
  
  private c$b(String paramString, File paramFile)
  {
    if (paramString == null) {
      throw new NullPointerException();
    }
    a = paramString;
    if (paramFile == null) {
      throw new IllegalArgumentException();
    }
    c = paramFile;
    d = paramFile.toString();
  }
  
  /* Error */
  private java.util.List a()
  {
    // Byte code:
    //   0: new 24	java/util/LinkedList
    //   3: dup
    //   4: invokespecial 58	java/util/LinkedList:<init>	()V
    //   7: astore_1
    //   8: aload_0
    //   9: dup
    //   10: astore_2
    //   11: getfield 27	com/teamdev/jxbrowser/c$b:b	Ljava/net/URL;
    //   14: ifnull +13 -> 27
    //   17: aload_2
    //   18: getfield 27	com/teamdev/jxbrowser/c$b:b	Ljava/net/URL;
    //   21: invokevirtual 56	java/net/URL:openStream	()Ljava/io/InputStream;
    //   24: goto +32 -> 56
    //   27: aload_2
    //   28: getfield 28	com/teamdev/jxbrowser/c$b:c	Ljava/io/File;
    //   31: ifnull +17 -> 48
    //   34: new 13	java/io/FileInputStream
    //   37: dup
    //   38: aload_2
    //   39: getfield 28	com/teamdev/jxbrowser/c$b:c	Ljava/io/File;
    //   42: invokespecial 42	java/io/FileInputStream:<init>	(Ljava/io/File;)V
    //   45: goto +11 -> 56
    //   48: new 14	java/io/IOException
    //   51: dup
    //   52: invokespecial 43	java/io/IOException:<init>	()V
    //   55: athrow
    //   56: astore_2
    //   57: new 10	java/io/BufferedReader
    //   60: dup
    //   61: new 15	java/io/InputStreamReader
    //   64: dup
    //   65: aload_2
    //   66: invokespecial 44	java/io/InputStreamReader:<init>	(Ljava/io/InputStream;)V
    //   69: invokespecial 38	java/io/BufferedReader:<init>	(Ljava/io/Reader;)V
    //   72: astore_2
    //   73: iconst_0
    //   74: istore_3
    //   75: iload_3
    //   76: ifne +294 -> 370
    //   79: iconst_0
    //   80: istore 4
    //   82: new 21	java/lang/StringBuffer
    //   85: dup
    //   86: invokespecial 52	java/lang/StringBuffer:<init>	()V
    //   89: astore 5
    //   91: bipush 11
    //   93: istore 6
    //   95: iconst_0
    //   96: istore 7
    //   98: iload 7
    //   100: iload 6
    //   102: if_icmpge +72 -> 174
    //   105: aload_2
    //   106: invokevirtual 39	java/io/BufferedReader:readLine	()Ljava/lang/String;
    //   109: dup
    //   110: astore 8
    //   112: ifnull +51 -> 163
    //   115: aload 8
    //   117: ldc 3
    //   119: invokestatic 33	com/teamdev/a/c:c	(Ljava/lang/String;)Ljava/lang/String;
    //   122: invokevirtual 51	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   125: ifeq +6 -> 131
    //   128: iconst_1
    //   129: istore 4
    //   131: aload 8
    //   133: ldc 1
    //   135: invokestatic 33	com/teamdev/a/c:c	(Ljava/lang/String;)Ljava/lang/String;
    //   138: invokevirtual 51	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   141: ifeq +6 -> 147
    //   144: iinc 6 2
    //   147: aload 5
    //   149: aload 8
    //   151: invokevirtual 54	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   154: bipush 10
    //   156: invokevirtual 53	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   159: pop
    //   160: goto +8 -> 168
    //   163: iconst_1
    //   164: istore_3
    //   165: goto +9 -> 174
    //   168: iinc 7 1
    //   171: goto -73 -> 98
    //   174: iconst_1
    //   175: istore 7
    //   177: iload 6
    //   179: bipush 11
    //   181: if_icmpne +7 -> 188
    //   184: iconst_1
    //   185: goto +4 -> 189
    //   188: iconst_0
    //   189: dup
    //   190: istore 8
    //   192: ifeq +69 -> 261
    //   195: aload_2
    //   196: invokevirtual 39	java/io/BufferedReader:readLine	()Ljava/lang/String;
    //   199: dup
    //   200: astore 6
    //   202: ifnull +59 -> 261
    //   205: aload 6
    //   207: invokevirtual 50	java/lang/String:length	()I
    //   210: ifeq +7 -> 217
    //   213: iconst_1
    //   214: goto +4 -> 218
    //   217: iconst_0
    //   218: istore 7
    //   220: aload 6
    //   222: ldc 1
    //   224: invokestatic 33	com/teamdev/a/c:c	(Ljava/lang/String;)Ljava/lang/String;
    //   227: invokevirtual 51	java/lang/String:startsWith	(Ljava/lang/String;)Z
    //   230: ifeq +31 -> 261
    //   233: aload 5
    //   235: aload 6
    //   237: invokevirtual 54	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   240: bipush 10
    //   242: invokevirtual 53	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   245: pop
    //   246: aload 5
    //   248: aload_2
    //   249: invokevirtual 39	java/io/BufferedReader:readLine	()Ljava/lang/String;
    //   252: invokevirtual 54	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   255: bipush 10
    //   257: invokevirtual 53	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   260: pop
    //   261: iload_3
    //   262: ifne +105 -> 367
    //   265: new 11	java/io/ByteArrayInputStream
    //   268: dup
    //   269: aload 5
    //   271: invokevirtual 55	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   274: invokevirtual 49	java/lang/String:getBytes	()[B
    //   277: invokespecial 40	java/io/ByteArrayInputStream:<init>	([B)V
    //   280: astore 6
    //   282: iload 4
    //   284: ifeq +17 -> 301
    //   287: new 5	com/teamdev/a/c
    //   290: dup
    //   291: aload 6
    //   293: invokespecial 31	com/teamdev/a/c:<init>	(Ljava/io/InputStream;)V
    //   296: astore 4
    //   298: goto +14 -> 312
    //   301: new 9	com/teamdev/jxbrowser/l
    //   304: dup
    //   305: aload 6
    //   307: invokespecial 37	com/teamdev/jxbrowser/l:<init>	(Ljava/io/InputStream;)V
    //   310: astore 4
    //   312: aload 4
    //   314: ldc 2
    //   316: invokestatic 33	com/teamdev/a/c:c	(Ljava/lang/String;)Ljava/lang/String;
    //   319: invokevirtual 32	com/teamdev/a/c:a	(Ljava/lang/String;)Ljava/lang/String;
    //   322: astore 5
    //   324: aload_0
    //   325: getfield 26	com/teamdev/jxbrowser/c$b:a	Ljava/lang/String;
    //   328: aload 5
    //   330: invokevirtual 48	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   333: ifeq +12 -> 345
    //   336: aload_1
    //   337: aload 4
    //   339: invokeinterface 61 2 0
    //   344: pop
    //   345: iload 7
    //   347: ifeq +16 -> 363
    //   350: aload_2
    //   351: invokevirtual 39	java/io/BufferedReader:readLine	()Ljava/lang/String;
    //   354: ifnonnull +7 -> 361
    //   357: iconst_1
    //   358: goto +4 -> 362
    //   361: iconst_0
    //   362: istore_3
    //   363: goto -288 -> 75
    //   366: pop
    //   367: goto -292 -> 75
    //   370: aload_1
    //   371: areturn
    // Exception table:
    //   from	to	target	type
    //   312	363	366	java/lang/Exception
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.c.b
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser;

import com.jniwrapper.Library;
import com.jniwrapper.LibraryLoader;
import com.jniwrapper.LibraryNotFoundException;
import com.teamdev.a.a;
import com.teamdev.a.d;
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;

final class c
  implements d, FileFilter
{
  private static final String a = ;
  private String b;
  private String c;
  private File d;
  
  private static String b()
  {
    String str = null;
    try
    {
      str = System.getProperty(com.teamdev.a.c.c("-3pfdgyy7iw30e180852lch6dp"));
    }
    catch (Exception localException) {}
    if (str != null) {
      return str;
    }
    return com.teamdev.a.c.c("-3pfdgyy7iw30e180852lch6dp");
  }
  
  public c(String paramString1, String paramString2)
  {
    c = paramString1;
    b = paramString2;
  }
  
  public final List a()
  {
    LinkedList localLinkedList = new LinkedList();
    if ((localObject1 = Library.getDefaultLibraryLoader().findLibrary(Library.NATIVE_CODE)) == null) {
      throw new LibraryNotFoundException("Cannot find JNIWrapper native library (" + Library.NATIVE_NAME + ")");
    }
    Object localObject1 = ((File)localObject1).getParentFile();
    Object localObject2 = new LinkedList();
    Object localObject3 = localObject1;
    if ((localObject3 = (localObject3 = new File((File)localObject3, a)).exists() ? localObject3 : null) != null) {
      ((List)localObject2).add(new b(c, (File)localObject3, null));
    }
    ((List)localObject2).addAll(a(b, (File)localObject1));
    try
    {
      ((List)localObject2).addAll(c());
      ((List)localObject2).addAll(a(b));
    }
    catch (IOException localIOException1) {}
    localObject1 = ((List)localObject2).iterator();
    while (((Iterator)localObject1).hasNext())
    {
      localObject2 = null;
      localObject2 = ((Iterator)localObject1).next();
      localObject3 = null;
      try
      {
        l locall;
        String str;
        if ((localObject2 instanceof File))
        {
          localObject3 = (File)localObject2;
          localObject2 = new FileInputStream((File)localObject3);
          localObject3 = ((File)localObject3).getAbsolutePath();
          str = (locall = new l((InputStream)localObject2)).a(com.teamdev.a.c.c("1q7n272qd84"));
          if (c.equals(str))
          {
            localObject3 = new a(locall, (String)localObject3);
            ((InputStream)localObject2).close();
            localLinkedList.add(localObject3);
          }
        }
        else if ((localObject2 instanceof URL))
        {
          localObject2 = (localObject3 = (URL)localObject2).openStream();
          localObject3 = ((URL)localObject3).getFile();
          if (localObject2 != null)
          {
            str = (locall = new l((InputStream)localObject2)).a(com.teamdev.a.c.c("1q7n272qd84"));
            if (c.equals(str))
            {
              localObject3 = new a(locall, (String)localObject3);
 
1 2 3 4 5 6 7 8

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