public void addExtension(File extensionToInstall) throws IOException {
    verifyPathIsOEX(extensionToInstall);
    createInitialDirectoryIfNecessary();

    String wuid = WUID_PREFIX + UUID.randomUUID().toString();
    // the name is guaranteed to end with .oex, enforced earlier by the verifyPathIsOEX method.
    File oexfile = File.createTempFile(OEX_PATH_PREFIX, extensionToInstall.getName(), directory);

    Files.copy(extensionToInstall, oexfile);
    writeOEXtoWidgetsDat(wuid, oexfile);
    createOEXDirectory(wuid);
  }
public void addExtension ( File extensionToInstall ) throws IOException { verifyPathIsOEX ( extensionToInstall ) ; createInitialDirectoryIfNecessary ( ) ; String wuid = WUID_PREFIX + UUID . randomUUID ( ) . toString ( ) ; File oexfile = File . createTempFile ( OEX_PATH_PREFIX , extensionToInstall . getName ( ) , directory ) ; Files . copy ( extensionToInstall , oexfile ) ; writeOEXtoWidgetsDat ( wuid , oexfile ) ; createOEXDirectory ( wuid ) ; }
Adds an extension to the profile. The file is expected to be an Opera 12 extension file (OEX).

@throws IOException If the extension files cannot be written to the profile.