org.eclipse.osgi_3.8.2.v20130124-134944

ramArrayOfString, GenericSpecification[] paramArrayOfGenericSpecification, GenericDescription[] paramArrayOfGenericDescription, NativeCodeSpecification paramNativeCodeSpecification);
  
  public abstract BundleDescription createBundleDescription(State paramState, Dictionary<String, String> paramDictionary, String paramString, long paramLong)
    throws BundleException;
  
  /**
   * @deprecated
   */
  public abstract BundleDescription createBundleDescription(Dictionary<String, String> paramDictionary, String paramString, long paramLong)
    throws BundleException;
  
  public abstract BundleDescription createBundleDescription(BundleDescription paramBundleDescription);
  
  public abstract BundleSpecification createBundleSpecification(String paramString, VersionRange paramVersionRange, boolean paramBoolean1, boolean paramBoolean2);
  
  public abstract BundleSpecification createBundleSpecification(BundleSpecification paramBundleSpecification);
  
  public abstract List<BundleSpecification> createBundleSpecifications(String paramString);
  
  public abstract HostSpecification createHostSpecification(String paramString, VersionRange paramVersionRange);
  
  public abstract List<HostSpecification> createHostSpecifications(String paramString);
  
  public abstract HostSpecification createHostSpecification(HostSpecification paramHostSpecification);
  
  public abstract ImportPackageSpecification createImportPackageSpecification(String paramString1, VersionRange paramVersionRange1, String paramString2, VersionRange paramVersionRange2, Map<String, ?> paramMap1, Map<String, ?> paramMap2, BundleDescription paramBundleDescription);
  
  public abstract ImportPackageSpecification createImportPackageSpecification(ImportPackageSpecification paramImportPackageSpecification);
  
  public abstract List<ImportPackageSpecification> createImportPackageSpecifications(String paramString);
  
  public abstract ExportPackageDescription createExportPackageDescription(String paramString, Version paramVersion, Map<String, ?> paramMap1, Map<String, ?> paramMap2, boolean paramBoolean, BundleDescription paramBundleDescription);
  
  /**
   * @deprecated
   */
  public abstract GenericDescription createGenericDescription(String paramString1, String paramString2, Version paramVersion, Map<String, ?> paramMap);
  
  public abstract GenericDescription createGenericDescription(String paramString, Map<String, ?> paramMap, Map<String, String> paramMap1, BundleDescription paramBundleDescription);
  
  public abstract List<GenericDescription> createGenericDescriptions(String paramString);
  
  public abstract GenericSpecification createGenericSpecification(String paramString1, String paramString2, String paramString3, boolean paramBoolean1, boolean paramBoolean2)
    throws InvalidSyntaxException;
  
  public abstract List<GenericSpecification> createGenericSpecifications(String paramString);
  
  public abstract NativeCodeSpecification createNativeCodeSpecification(NativeCodeDescription[] paramArrayOfNativeCodeDescription, boolean paramBoolean);
  
  public abstract NativeCodeDescription createNativeCodeDescription(String[] paramArrayOfString1, String[] paramArrayOfString2, String[] paramArrayOfString3, VersionRange[] paramArrayOfVersionRange, String[] paramArrayOfString4, String paramString)
    throws InvalidSyntaxException;
  
  public abstract ExportPackageDescription createExportPackageDescription(ExportPackageDescription paramExportPackageDescription);
  
  public abstract List<ExportPackageDescription> createExportPackageDescriptions(String paramString);
  
  /**
   * @deprecated
   */
  public abstract void writeState(State paramState, OutputStream paramOutputStream)
    throws IOException;
  
  /**
   * @deprecated
   */
  public abstract void writeState(State paramState, DataOutputStream paramDataOutputStream)
    throws IOException;
  
  public abstract void writeState(State paramState, File paramFile)
    throws IOException;
  
  /**
   * @deprecated
   */
  public abstract State readState(InputStream paramInputStream)
    throws IOException;
  
  /**
   * @deprecated
   */
  public abstract State readState(DataInputStream paramDataInputStream)
    throws IOException;
  
  public abstract State readState(File paramFile)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.StateObjectFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver;

public class StateWire
{
  private final BundleDescription requirementHost;
  private final VersionConstraint declaredRequirement;
  private final BundleDescription capabilityHost;
  private final BaseDescription declaredCapability;
  
  public StateWire(BundleDescription requirementHost, VersionConstraint declaredRequirement, BundleDescription capabilityHost, BaseDescription declaredCapability)
  {
    this.requirementHost = requirementHost;
    this.declaredRequirement = declaredRequirement;
    this.capabilityHost = capabilityHost;
    this.declaredCapability = declaredCapability;
  }
  
  public BundleDescription getRequirementHost()
  {
    return requirementHost;
  }
  
  public VersionConstraint getDeclaredRequirement()
  {
    return declaredRequirement;
  }
  
  public BundleDescription getCapabilityHost()
  {
    return capabilityHost;
  }
  
  public BaseDescription getDeclaredCapability()
  {
    return declaredCapability;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.StateWire
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver;

import org.osgi.framework.wiring.BundleRequirement;

public abstract interface VersionConstraint
  extends Cloneable
{
  public abstract String getName();
  
  public abstract VersionRange getVersionRange();
  
  public abstract BundleDescription getBundle();
  
  public abstract boolean isResolved();
  
  public abstract boolean isSatisfiedBy(BaseDescription paramBaseDescription);
  
  public abstract BaseDescription getSupplier();
  
  public abstract BundleRequirement getRequirement();
  
  public abstract Object getUserObject();
  
  public abstract void setUserObject(Object paramObject);
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.VersionConstraint
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver;

import org.osgi.framework.Version;

public class VersionRange
  extends org.osgi.framework.VersionRange
{
  private static final Version versionMax = new Version(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
  private static final char INCLUDE_MIN = '[';
  private static final char EXCLUDE_MIN = '(';
  private static final char INCLUDE_MAX = ']';
  private static final char EXCLUDE_MAX = ')';
  public static final VersionRange emptyRange = new VersionRange("0.0.0");
  
  public VersionRange(Version minVersion, boolean includeMin, Version maxVersion, boolean includeMax)
  {
    super(includeMin ? '[' : '(', minVersion == null ? Version.emptyVersion : minVersion, versionMax.equals(maxVersion) ? null : maxVersion, includeMax ? ']' : ')');
  }
  
  public VersionRange(String versionRange)
  {
    super((versionRange == null) || (versionRange.length() == 0) ? "0.0.0" : versionRange);
  }
  
  public Version getMinimum()
  {
    return getLeft();
  }
  
  public boolean getIncludeMinimum()
  {
    return getLeftType() == '[';
  }
  
  /**
   * @deprecated
   */
  public Version getMaximum()
  {
    Version right = getRight();
    return right == null ? versionMax : right;
  }
  
  public boolean getIncludeMaximum()
  {
    return getRightType() == ']';
  }
  
  public boolean isIncluded(Version version)
  {
    if (version == null) {
      version = Version.emptyVersion;
    }
    return includes(version);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.VersionRange
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver.extras;

import org.eclipse.osgi.service.resolver.BaseDescription;

public abstract interface DescriptionReference
{
  public abstract BaseDescription getDescription();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.extras.DescriptionReference
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver.extras;

import java.util.Comparator;

public abstract interface Sortable<E>
{
  public abstract void sort(Comparator<E> paramComparator);
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.extras.Sortable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.resolver.extras;

import org.eclipse.osgi.service.resolver.VersionConstraint;

public abstract interface SpecificationReference
{
  public abstract VersionConstraint getSpecification();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.resolver.extras.SpecificationReference
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.runnable;

public abstract interface ApplicationLauncher
{
  public abstract void launch(ParameterizedRunnable paramParameterizedRunnable, Object paramObject);
  
  public abstract void shutdown();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.runnable.ApplicationLauncher
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.runnable;

public abstract interface ApplicationRunnable
  extends ParameterizedRunnable
{
  public abstract void stop();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.runnable.ApplicationRunnable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.runnable;

public abstract interface ParameterizedRunnable
{
  public abstract Object run(Object paramObject)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.runnable.ParameterizedRunnable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.runnable;

public abstract interface StartupMonitor
{
  public abstract void update();
  
  public abstract void applicationRunning();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.runnable.StartupMonitor
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.security;

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.security.cert.Certificate;
import org.eclipse.osgi.internal.signedcontent.TrustEngineListener;

public abstract class TrustEngine
{
  public abstract Certificate findTrustAnchor(Certificate[] paramArrayOfCertificate)
    throws IOException;
  
  public String addTrustAnchor(Certificate anchor, String alias)
    throws IOException, GeneralSecurityException
  {
    String storedAlias = doAddTrustAnchor(anchor, alias);
    TrustEngineListener listener = TrustEngineListener.getInstance();
    if (listener != null) {
      listener.addedTrustAnchor(anchor);
    }
    return storedAlias;
  }
  
  protected abstract String doAddTrustAnchor(Certificate paramCertificate, String paramString)
    throws IOException, GeneralSecurityException;
  
  public final void removeTrustAnchor(Certificate anchor)
    throws IOException, GeneralSecurityException
  {
    doRemoveTrustAnchor(anchor);
    TrustEngineListener listener = TrustEngineListener.getInstance();
    if (listener != null) {
      listener.removedTrustAnchor(anchor);
    }
  }
  
  protected abstract void doRemoveTrustAnchor(Certificate paramCertificate)
    throws IOException, GeneralSecurityException;
  
  public void removeTrustAnchor(String alias)
    throws IOException, GeneralSecurityException
  {
    Certificate existing = getTrustAnchor(alias);
    doRemoveTrustAnchor(alias);
    if (existing != null)
    {
      TrustEngineListener listener = TrustEngineListener.getInstance();
      if (listener != null) {
        listener.removedTrustAnchor(existing);
      }
    }
  }
  
  protected abstract void doRemoveTrustAnchor(String paramString)
    throws IOException, GeneralSecurityException;
  
  public abstract Certificate getTrustAnchor(String paramString)
    throws IOException, GeneralSecurityException;
  
  public abstract String[] getAliases()
    throws IOException, GeneralSecurityException;
  
  public abstract boolean isReadOnly();
  
  public abstract String getName();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.security.TrustEngine
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.service.urlconversion;

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

public abstract interface URLConverter
{
  public abstract URL toFileURL(URL paramURL)
    throws IOException;
  
  public abstract URL resolve(URL paramURL)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.service.urlconversion.URLConverter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.signedcontent;

import java.io.IOException;

public class InvalidContentException
  extends IOException
{
  private static final long serialVersionUID = -399150159330289387L;
  private final Throwable cause;
  
  public InvalidContentException(String message, Throwable cause)
  {
    super(message);
    this.cause = cause;
  }
  
  public Throwable getCause()
  {
    return cause;
  }
  
  public Throwable initCause(Throwable t)
  {
    throw new IllegalStateException();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.signedcontent.InvalidContentException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.signedcontent;

import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
import java.util.Date;

public abstract interface SignedContent
{
  public abstract SignedContentEntry[] getSignedEntries();
  
  public abstract SignedContentEntry getSignedEntry(String paramString);
  
  public abstract SignerInfo[] getSignerInfos();
  
  public abstract boolean isSigned();
  
  public abstract Date getSigningTime(SignerInfo paramSignerInfo);
  
  public abstract SignerInfo getTSASignerInfo(SignerInfo paramSignerInfo);
  
  public abstract void checkValidity(SignerInfo paramSignerInfo)
    throws CertificateExpiredException, CertificateNotYetValidException;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.signedcontent.SignedContent
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.signedcontent;

import java.io.IOException;

public abstract interface SignedContentEntry
{
  public abstract String getName();
  
  public abstract SignerInfo[] getSignerInfos();
  
  public abstract boolean isSigned();
  
  public abstract void verify()
    throws IOException, InvalidContentException;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.signedcontent.SignedContentEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.signedcontent;

import java.io.File;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.SignatureException;
import java.security.cert.CertificateException;
import org.osgi.framework.Bundle;

public abstract interface SignedContentFactory
{
  public abstract SignedContent getSignedContent(File paramFile)
    throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException;
  
  public abstract SignedContent getSignedContent(Bundle paramBundle)
    throws IOException, InvalidKeyException, SignatureException, CertificateException, NoSuchAlgorithmException, NoSuchProviderException;
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.signedcontent.SignedContentFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.signedcontent;

import java.security.cert.Certificate;

public abstract interface SignerInfo
{
  public abstract Certificate[] getCertificateChain();
  
  public abstract Certificate getTrustAnchor();
  
  public abstract boolean isTrusted();
  
  public abstract String getMessageDigestAlgorithm();
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.signedcontent.SignerInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.storagemanager;

import java.io.File;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public final class ManagedOutputStream
  extends FilterOutputStream
{
  static final int ST_OPEN = 0;
  static final int ST_CLOSED = 1;
  private String target;
  private StorageManager manager;
  private File outputFile;
  private int state;
  private ManagedOutputStream[] streamSet = null;
  
  ManagedOutputStream(OutputStream out, StorageManager manager, String target, File outputFile)
  {
    super(out);
    this.manager = manager;
    this.target = target;
    this.outputFile = outputFile;
    state = 0;
  }
  
  public void close()
    throws IOException
  {
    manager.closeOutputStream(this);
  }
  
  public void abort()
  {
    manager.abortOutputStream(this);
  }
  
  OutputStream getOutputStream()
  {
    return out;
  }
  
  String getTarget()
  {
    return target;
  }
  
  File getOutputFile()
  {
    return outputFile;
  }
  
  int getState()
  {
    return state;
  }
  
  void setState(int state)
  {
    this.state = state;
  }
  
  void setStreamSet(ManagedOutputStream[] set)
  {
    streamSet = set;
  }
  
  ManagedOutputStream[] getStreamSet()
  {
    return streamSet;
  }
  
  public void write(byte[] bytes, int off, int len)
    throws IOException
  {
    out.write(bytes, off, len);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.storagemanager.ManagedOutputStream
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.storagemanager;

class StorageManager$Entry
{
  int readId;
  int writeId;
  int fileType;
  final StorageManager this$0;
  
  StorageManager$Entry(StorageManager paramStorageManager, int readId, int writeId, int type)
  {
    this.readId = readId;
    this.writeId = writeId;
    fileType = type;
  }
  
  int getReadId()
  {
    return readId;
  }
  
  int getWriteId()
  {
    return writeId;
  }
  
  int getFileType()
  {
    return fileType;
  }
  
  void setReadId(int value)
  {
    readId = value;
  }
  
  void setWriteId(int value)
  {
    writeId = value;
  }
  
  void setFileType(int type)
  {
    fileType = type;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.storagemanager.StorageManager.Entry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.storagemanager;

import java.io.File;
import java.io.FileDescriptor;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.SyncFailedException;
import java.security.AccessController;
import java.util.Collection;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import org.eclipse.core.runtime.internal.adaptor.BasicLocation;
import org.eclipse.core.runtime.internal.adaptor.EclipseAdaptorMsg;
import org.eclipse.core.runtime.internal.adaptor.Locker;
import org.eclipse.osgi.framework.internal.reliablefile.ReliableFile;
import org.eclipse.osgi.framework.internal.reliablefile.ReliableFileInputStream;
import org.eclipse.osgi.framework.internal.reliablefile.ReliableFileOutputStream;
import org.eclipse.osgi.framework.util.SecureAction;

public final class StorageManager
{
  private static final int FILETYPE_STANDARD = 0;
  private static final int FILETYPE_RELIABLEFILE = 1;
  private static final SecureAction secure = (SecureAction)AccessController.doPrivileged(SecureAction.createSecureAction());
  private static final String MANAGER_FOLDER = ".manager";
  private static final String TABLE_FILE = ".fileTable";
  private static final String LOCK_FILE = ".fileTableLock";
  private static final int MAX_LOCK_WAIT = 5000;
  private final boolean useReliableFiles = Boolean.valueOf(secure.getProperty("osgi.useReliableFiles")).booleanValue();
  private final boolean tempCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanTempFiles")).booleanValue();
  private final boolean openCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnOpen")).booleanValue();
  private final boolean saveCleanup = Boolean.valueOf(secure.getProperty("osgi.embedded.cleanupOnSave")).booleanValue();
  private final File base;
  private final File managerRoot;
  private final String lockMode;
  private final File tableFile;
  private final File lockFile;
  private Locker locker;
  private File instanceFile;
  
  private class Entry
  {
    int readId;
    int writeId;
    int fileType;
    
    Entry(int readId, int writeId, int type)
    {
      this.readId = readId;
      this.writeId = writeId;
      fileType = type;
    }
    
    int getReadId()
    {
      return readId;
    }
    
    int getWriteId()
    {
      return writeId;
    }
    
    int getFileType()
    {
      return fileType;
    }
    
    void setReadId(int value)
    {
      readId = value;
    }
    
    void setWriteId(int value)
    {
      writeId = value;
    }
    
    void setFileType(int type)
    {
      fileType = type;
    }
  }
  
  private Locker instanceLocker = null;
  private final boolean readOnly;
  private boolean open;
  private int tableStamp = -1;
  private final Properties table = new Properties();
  
  public StorageManager(File base, String lockMode)
  {
    this(base, lockMode, false);
  }
  
  public StorageManager(File base, String lockMode, boolean readOnly)
  {
    this.base = base;
    this.lockMode = lockMode;
    managerRoot = new File(base, ".manager");
    tableFile = new File(managerRoot, ".fileTable");
    lockFile = new File(managerRoot, ".fileTableLock");
    this.readOnly = readOnly;
    open = false;
  }
  
  private void initializeInstanceFile()
    throws IOException
  {
    if ((instanceFile != null) || (readOnly)) {
      return;
    }
    instanceFile = File.createTempFile(".tmp", ".instance", managerRoot);
    instanceFile.deleteOnExit();
    instanceLocker = BasicLocation.createLocker(instanceFile, lockMode);
    instanceLocker.lock();
  }
  
  private String getAbsolutePath(String file)
  {
    return new File(base, file).getAbsolutePath();
  }
  
  public void add(String managedFile)
    throws IOException
  {
    add(managedFile, 0);
  }
  
  /* Error */
  private void add(String managedFile, int fileType)
    throws IOException
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 501	org/eclipse/osgi/storagemanager/StorageManager:open	Z
    //   4: ifne +14 -> 18
    //   7: new 261	java/io/IOException
    //   10: dup
    //   11: getstatic 498	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_notOpen	Ljava/lang/String;
    //   14: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   17: athrow
    //   18: aload_0
    //   19: getfield 503	org/eclipse/osgi/storagemanager/StorageManager:readOnly	Z
    //   22: ifeq +14 -> 36
    //   25: new 261	java/io/IOException
    //   28: dup
    //   29: getstatic 497	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_illegalInReadOnlyMode	Ljava/lang/String;
    //   32: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   35: athrow
    //   36: aload_0
    //   37: iconst_1
    //   38: invokespecial 597	org/eclipse/osgi/storagemanager/StorageManager:lock	(Z)Z
    //   41: ifne +14 -> 55
    //   44: new 261	java/io/IOException
    //   47: dup
    //   48: getstatic 496	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_cannotLock	Ljava/lang/String;
    //   51: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   54: athrow
    //   55: aload_0
    //   56: invokespecial 595	org/eclipse/osgi/storagemanager/StorageManager:updateTable	()V
    //   59: aload_0
    //   60: getfield 513	org/eclipse/osgi/storagemanager/StorageManager:table	Ljava/util/Properties;
    //   63: aload_1
    //   64: invokevirtual 566	java/util/Properties:get	(Ljava/lang/Object;)Ljava/lang/Object;
    //   67: checkcast 292	org/eclipse/osgi/storagemanager/StorageManager$Entry
    //   70: astore_3
    //   71: aload_3
    //   72: ifnonnull +52 -> 124
    //   75: new 292	org/eclipse/osgi/storagemanager/StorageManager$Entry
    //   78: dup
    //   79: aload_0
    //   80: iconst_0
    //   81: iconst_1
    //   82: iload_2
    //   83: invokespecial 619	org/eclipse/osgi/storagemanager/StorageManager$Entry:<init>	(Lorg/eclipse/osgi/storagemanager/StorageManager;III)V
    //   86: astore_3
    //   87: aload_0
    //   88: getfield 513	org/eclipse/osgi/storagemanager/StorageManager:table	Ljava/util/Properties;
    //   91: aload_1
    //   92: aload_3
    //   93: invokevirtual 570	java/util/Properties:put	(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    //   96: pop
    //   97: aload_0
    //   98: aload_1
    //   99: invokespecial 599	org/eclipse/osgi/storagemanager/StorageManager:findOldestGeneration	(Ljava/lang/String;)I
    //   102: istore 4
    //   104: iload 4
    //   106: ifeq +11 -> 117
    //   109: aload_3
    //   110: iload 4
    //   112: iconst_1
    //   113: iadd
    //   114: invokevirtual 618	org/eclipse/osgi/storagemanager/StorageManager$Entry:setWriteId	(I)V
    //   117: aload_0
    //   118: invokespecial 594	org/eclipse/osgi/storagemanager/StorageManager:save	()V
    //   121: goto +36 -> 157
    //   124: aload_3
    //   125: invokevirtual 613	org/eclipse/osgi/storagemanager/StorageManager$Entry:getFileType	()I
    //   128: iload_2
    //   129: if_icmpeq +28 -> 157
    //   132: aload_3
    //   133: iload_2
    //   134: invokevirtual 616	org/eclipse/osgi/storagemanager/StorageManager$Entry:setFileType	(I)V
    //   137: aload_0
    //   138: invokespecial 595	org/eclipse/osgi/storagemanager/StorageManager:updateTable	()V
    //   141: aload_0
    //   142: invokespecial 594	org/eclipse/osgi/storagemanager/StorageManager:save	()V
    //   145: goto +12 -> 157
    //   148: astore 5
    //   150: aload_0
    //   151: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   154: aload 5
    //   156: athrow
    //   157: aload_0
    //   158: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   161: return
    // Line number table:
    //   Java source line #216	-> byte code offset #0
    //   Java source line #217	-> byte code offset #7
    //   Java source line #218	-> byte code offset #18
    //   Java source line #219	-> byte code offset #25
    //   Java source line #220	-> byte code offset #36
    //   Java source line #221	-> byte code offset #44
    //   Java source line #223	-> byte code offset #55
    //   Java source line #224	-> byte code offset #59
    //   Java source line #225	-> byte code offset #71
    //   Java source line #226	-> byte code offset #75
    //   Java source line #227	-> byte code offset #87
    //   Java source line #231	-> byte code offset #97
    //   Java source line #232	-> byte code offset #104
    //   Java source line #233	-> byte code offset #109
    //   Java source line #234	-> byte code offset #117
    //   Java source line #235	-> byte code offset #121
    //   Java source line #236	-> byte code offset #124
    //   Java source line #237	-> byte code offset #132
    //   Java source line #238	-> byte code offset #137
    //   Java source line #239	-> byte code offset #141
    //   Java source line #242	-> byte code offset #145
    //   Java source line #243	-> byte code offset #150
    //   Java source line #244	-> byte code offset #154
    //   Java source line #243	-> byte code offset #157
    //   Java source line #245	-> byte code offset #161
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	162	0	this	StorageManager
    //   0	162	1	managedFile	String
    //   0	162	2	fileType	int
    //   70	63	3	entry	Entry
    //   102	9	4	oldestGeneration	int
    //   148	7	5	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   55	148	148	finally
  }
  
  private int findOldestGeneration(String managedFile)
  {
    String[] files = base.list();
    int oldestGeneration = 0;
    if (files != null)
    {
      String name = managedFile + '.';
      int len = name.length();
      for (int i = 0; i < files.length; i++) {
        if (files[i].startsWith(name)) {
          try
          {
            int generation = Integer.parseInt(files[i].substring(len));
            if (generation > oldestGeneration) {
              oldestGeneration = generation;
            }
          }
          catch (NumberFormatException localNumberFormatException) {}
        }
      }
    }
    return oldestGeneration;
  }
  
  /* Error */
  public void update(String[] managedFiles, String[] sources)
    throws IOException
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 501	org/eclipse/osgi/storagemanager/StorageManager:open	Z
    //   4: ifne +14 -> 18
    //   7: new 261	java/io/IOException
    //   10: dup
    //   11: getstatic 498	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_notOpen	Ljava/lang/String;
    //   14: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   17: athrow
    //   18: aload_0
    //   19: getfield 503	org/eclipse/osgi/storagemanager/StorageManager:readOnly	Z
    //   22: ifeq +14 -> 36
    //   25: new 261	java/io/IOException
    //   28: dup
    //   29: getstatic 497	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_illegalInReadOnlyMode	Ljava/lang/String;
    //   32: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   35: athrow
    //   36: aload_0
    //   37: iconst_1
    //   38: invokespecial 597	org/eclipse/osgi/storagemanager/StorageManager:lock	(Z)Z
    //   41: ifne +14 -> 55
    //   44: new 261	java/io/IOException
    //   47: dup
    //   48: getstatic 496	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_cannotLock	Ljava/lang/String;
    //   51: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   54: athrow
    //   55: aload_0
    //   56: invokespecial 595	org/eclipse/osgi/storagemanager/StorageManager:updateTable	()V
    //   59: aload_1
    //   60: arraylength
    //   61: newarray <illegal type>
    //   63: astore_3
    //   64: iconst_0
    //   65: istore 4
    //   67: iconst_0
    //   68: istore 5
    //   70: goto +36 -> 106
    //   73: aload_3
    //   74: iload 5
    //   76: aload_0
    //   77: aload_1
    //   78: iload 5
    //   80: aaload
    //   81: invokevirtual 600	org/eclipse/osgi/storagemanager/StorageManager:getId	(Ljava/lang/String;)I
    //   84: iastore
    //   85: aload_0
    //   86: aload_1
    //   87: iload 5
    //   89: aaload
    //   90: aload_2
    //   91: iload 5
    //   93: aaload
    //   94: invokespecial 610	org/eclipse/osgi/storagemanager/StorageManager:update	(Ljava/lang/String;Ljava/lang/String;)Z
    //   97: ifne +6 -> 103
    //   100: iconst_1
    //   101: istore 4
    //   103: iinc 5 1
    //   106: iload 5
    //   108: aload_1
    //   109: arraylength
    //   110: if_icmplt -37 -> 73
    //   113: iload 4
    //   115: ifeq +55 -> 170
    //   118: iconst_0
    //   119: istore 5
    //   121: goto +31 -> 152
    //   124: aload_0
    //   125: getfield 513	org/eclipse/osgi/storagemanager/StorageManager:table	Ljava/util/Properties;
    //   128: aload_1
    //   129: iload 5
    //   131: aaload
    //   132: invokevirtual 566	java/util/Properties:get	(Ljava/lang/Object;)Ljava/lang/Object;
    //   135: checkcast 292	org/eclipse/osgi/storagemanager/StorageManager$Entry
    //   138: astore 6
    //   140: aload 6
    //   142: aload_3
    //   143: iload 5
    //   145: iaload
    //   146: invokevirtual 617	org/eclipse/osgi/storagemanager/StorageManager$Entry:setReadId	(I)V
    //   149: iinc 5 1
    //   152: iload 5
    //   154: aload_1
    //   155: arraylength
    //   156: if_icmplt -32 -> 124
    //   159: new 261	java/io/IOException
    //   162: dup
    //   163: getstatic 499	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_updateFailed	Ljava/lang/String;
    //   166: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   169: athrow
    //   170: aload_0
    //   171: invokespecial 594	org/eclipse/osgi/storagemanager/StorageManager:save	()V
    //   174: goto +12 -> 186
    //   177: astore 7
    //   179: aload_0
    //   180: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   183: aload 7
    //   185: athrow
    //   186: aload_0
    //   187: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   190: return
    // Line number table:
    //   Java source line #287	-> byte code offset #0
    //   Java source line #288	-> byte code offset #7
    //   Java source line #289	-> byte code offset #18
    //   Java source line #290	-> byte code offset #25
    //   Java source line #291	-> byte code offset #36
    //   Java source line #292	-> byte code offset #44
    //   Java source line #294	-> byte code offset #55
    //   Java source line #295	-> byte code offset #59
    //   Java source line #296	-> byte code offset #64
    //   Java source line #297	-> byte code offset #67
    //   Java source line #298	-> byte code offset #73
    //   Java source line #299	-> byte code offset #85
    //   Java source line #300	-> byte code offset #100
    //   Java source line #297	-> byte code offset #103
    //   Java source line #302	-> byte code offset #113
    //   Java source line #304	-> byte code offset #118
    //   Java source line #305	-> byte code offset #124
    //   Java source line #306	-> byte code offset #140
    //   Java source line #304	-> byte code offset #149
    //   Java source line #308	-> byte code offset #159
    //   Java source line #310	-> byte code offset #170
    //   Java source line #311	-> byte code offset #174
    //   Java source line #312	-> byte code offset #179
    //   Java source line #313	-> byte code offset #183
    //   Java source line #312	-> byte code offset #186
    //   Java source line #314	-> byte code offset #190
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	191	0	this	StorageManager
    //   0	191	1	managedFiles	String[]
    //   0	191	2	sources	String[]
    //   63	80	3	originalReadIDs	int[]
    //   65	49	4	error	boolean
    //   68	39	5	i	int
    //   119	34	5	i	int
    //   138	3	6	entry	Entry
    //   177	7	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   55	177	177	finally
  }
  
  public String[] getManagedFiles()
  {
    if (!open) {
      return null;
    }
    Set<Object> set = table.keySet();
    
    String[] keys = (String[])set.toArray(new String[set.size()]);
    String[] result = new String[keys.length];
    for (int i = 0; i < keys.length; i++) {
      result[i] = new String(keys[i]);
    }
    return result;
  }
  
  public File getBase()
  {
    return base;
  }
  
  public int getId(String managedFile)
  {
    if (!open) {
      return -1;
    }
    Entry entry = (Entry)table.get(managedFile);
    if (entry == null) {
      return -1;
    }
    return entry.getReadId();
  }
  
  public boolean isReadOnly()
  {
    return readOnly;
  }
  
  private boolean lock(boolean wait)
    throws IOException
  {
    if (readOnly) {
      return false;
    }
    if (locker == null)
    {
      locker = BasicLocation.createLocker(lockFile, lockMode);
      if (locker == null) {
        throw new IOException(EclipseAdaptorMsg.fileManager_cannotLock);
      }
    }
    boolean locked = locker.lock();
    if ((locked) || (!wait)) {
      return locked;
    }
    long start = System.currentTimeMillis();
    long time;
    do
    {
      try
      {
        Thread.sleep(200L);
      }
      catch (InterruptedException localInterruptedException) {}
      locked = locker.lock();
      if (locked) {
        return true;
      }
      time = System.currentTimeMillis() - start;
    } while (time <= 5000L);
    return false;
  }
  
  public File lookup(String managedFile, boolean add)
    throws IOException
  {
    if (!open) {
      throw new IOException(EclipseAdaptorMsg.fileManager_notOpen);
    }
    Entry entry = (Entry)table.get(managedFile);
    if (entry == null) {
      if (add)
      {
        add(managedFile);
        entry = (Entry)table.get(managedFile);
      }
      else
      {
        return null;
      }
    }
    return new File(getAbsolutePath(managedFile + '.' + entry.getReadId()));
  }
  
  private boolean move(String source, String managedFile)
  {
    File original = new File(source);
    File targetFile = new File(managedFile);
    if ((!original.exists()) || (targetFile.exists())) {
      return false;
    }
    return original.renameTo(targetFile);
  }
  
  private void release()
  {
    if (locker == null) {
      return;
    }
    locker.release();
  }
  
  /* Error */
  public void remove(String managedFile)
    throws IOException
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 501	org/eclipse/osgi/storagemanager/StorageManager:open	Z
    //   4: ifne +14 -> 18
    //   7: new 261	java/io/IOException
    //   10: dup
    //   11: getstatic 498	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_notOpen	Ljava/lang/String;
    //   14: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   17: athrow
    //   18: aload_0
    //   19: getfield 503	org/eclipse/osgi/storagemanager/StorageManager:readOnly	Z
    //   22: ifeq +14 -> 36
    //   25: new 261	java/io/IOException
    //   28: dup
    //   29: getstatic 497	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_illegalInReadOnlyMode	Ljava/lang/String;
    //   32: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   35: athrow
    //   36: aload_0
    //   37: iconst_1
    //   38: invokespecial 597	org/eclipse/osgi/storagemanager/StorageManager:lock	(Z)Z
    //   41: ifne +14 -> 55
    //   44: new 261	java/io/IOException
    //   47: dup
    //   48: getstatic 496	org/eclipse/core/runtime/internal/adaptor/EclipseAdaptorMsg:fileManager_cannotLock	Ljava/lang/String;
    //   51: invokespecial 533	java/io/IOException:<init>	(Ljava/lang/String;)V
    //   54: athrow
    //   55: aload_0
    //   56: invokespecial 595	org/eclipse/osgi/storagemanager/StorageManager:updateTable	()V
    //   59: aload_0
    //   60: getfield 513	org/eclipse/osgi/storagemanager/StorageManager:table	Ljava/util/Properties;
    //   63: aload_1
    //   64: invokevirtual 567	java/util/Properties:remove	(Ljava/lang/Object;)Ljava/lang/Object;
    //   67: pop
    //   68: aload_0
    //   69: invokespecial 594	org/eclipse/osgi/storagemanager/StorageManager:save	()V
    //   72: goto +10 -> 82
    //   75: astore_2
    //   76: aload_0
    //   77: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   80: aload_2
    //   81: athrow
    //   82: aload_0
    //   83: invokespecial 593	org/eclipse/osgi/storagemanager/StorageManager:release	()V
    //   86: return
    // Line number table:
    // 
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87

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-2019. Infinite Loop Ltd