Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.update.core
Class Utilities


java.lang.Object
  extended by 
org.eclipse.update.core.Utilities

Deprecated. The org.eclipse.update component has been replaced by Equinox p2. This provisional API was never promoted to stable API, and may be removed from a future release of the platform.

public class Utilities
extends Object

This class is a collection of utility functions that can be used for install processing

Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
Utilities ()
          Deprecated.  
 
Method Summary
static void copy ( InputStream is, OutputStream os, InstallMonitor monitor)
          Deprecated. Copies specified input stream to the output stream.
static  File createLocalFile ( File tmpDir, String name)
          Deprecated. Create a new working file.
static  File createWorkingDirectory ()
          Deprecated. Returns a new working directory (in temporary space).
static void flushLocalFile ()
          Deprecated. Flushes all the keys from the local file map.
static  String format ( Date date)
          Deprecated. Formats a Date based on the default Locale If teh Date is null returns an empty String
static  File lookupLocalFile ( String key)
          Deprecated. Returns a previously cached local file (in temporary area) matching the specified key.
static void mapLocalFile ( String key, File temp)
          Deprecated. The file is associated with a lookup key.
static  CoreException newCoreException ( String s, int code, Throwable e)
          Deprecated. Creates a CoreException from some other exception.
static  CoreException newCoreException ( String s, String s1, String s2, CoreException e1, CoreException e2)
          Deprecated. Creates a CoreException from two other CoreException
static  CoreException newCoreException ( String s, Throwable e)
          Deprecated. Creates a CoreException from some other exception.
static void removeLocalFile ( String key)
          Deprecated. Removes the specified key from the local file map.
static void shutdown ()
          Deprecated. Perform shutdown processing for temporary file handling.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Deprecated. 
Method Detail

createWorkingDirectory

public static 
File createWorkingDirectory()
                                   throws 
IOException
Deprecated. 
Returns a new working directory (in temporary space). Ensures the directory exists. Any directory levels that had to be created are marked for deletion on exit.

Returns:
working directory
Throws:
IOException
Since:
2.0

createLocalFile

public static 
File createLocalFile(
File tmpDir,
                                   
String name)
                            throws 
IOException
Deprecated. 
Create a new working file. The file is marked for deletion on exit.

Parameters:
tmpDir - directory location for new file. Any missing directory levels are created (and marked for deletion on exit)
name - optional file name, or null. If name is not specified, a temporary name is generated.
Returns:
created working file
Throws:
IOException
Since:
2.0
See Also:
lookupLocalFile(String)

mapLocalFile

public static void mapLocalFile(
String key,
                                
File temp)
Deprecated. 
The file is associated with a lookup key.

Parameters:
key - optional lookup key, or null.
temp - the local working file
Since:
2.0.2

lookupLocalFile

public static 
File lookupLocalFile(
String key)
Deprecated. 
Returns a previously cached local file (in temporary area) matching the specified key.

Parameters:
key - lookup key
Returns:
cached file, or null.
Since:
2.0

flushLocalFile

public static void flushLocalFile()
Deprecated. 
Flushes all the keys from the local file map. Reinitialize the cache.

Since:
2.1

removeLocalFile

public static void removeLocalFile(
String key)
Deprecated. 
Removes the specified key from the local file map. The file is not actually deleted until VM termination.

Parameters:
key - lookup key
Since:
2.0

copy

public static void copy(
InputStream is,
                        
OutputStream os,
                        
InstallMonitor monitor)
                 throws 
IOException,
                        
InstallAbortedException
Deprecated. 
Copies specified input stream to the output stream. Neither stream is closed as part of this operation.

Parameters:
is - input stream
os - output stream
monitor - progress monitor
Throws:
IOException
InstallAbortedException
Since:
2.0

newCoreException

public static 
CoreException newCoreException(
String s,
                                             int code,
                                             
Throwable e)
Deprecated. 
Creates a CoreException from some other exception. The type of the CoreException is IStatus.ERROR If the exception passed as a parameter is also a CoreException, the new CoreException will contain all the status of the passed CoreException.

Parameters:
s - exception string
code - the code reported
e - actual exception being reported
Returns:
a CoreException
Since:
2.0
See Also:
IStatus.ERROR

newCoreException

public static 
CoreException newCoreException(
String s,
                                             
Throwable e)
Deprecated. 
Creates a CoreException from some other exception. The type of the CoreException is IStatus.ERROR If the exception passed as a parameter is also a CoreException, the new CoreException will contain all the status of the passed CoreException.

Parameters:
s - exception string
e - actual exception being reported
Returns:
a CoreException
Since:
2.0
See Also:
IStatus.ERROR

newCoreException

public static 
CoreException newCoreException(
String s,
                                             
String s1,
                                             
String s2,
                                             
CoreException e1,
                                             
CoreException e2)
Deprecated. 
Creates a CoreException from two other CoreException

Parameters:
s - overall exception string
s1 - string for first detailed exception
s2 - string for second detailed exception
e1 - first detailed exception
e2 - second detailed exception
Returns:
a CoreException with multi-status
Since:
2.0

format

public static 
String format(
Date date)
Deprecated. 
Formats a Date based on the default Locale If teh Date is null returns an empty String

Parameters:
date - the Date to format
Returns:
the formatted Date as a String
Since:
2.0

shutdown

public static void shutdown()
Deprecated. 
Perform shutdown processing for temporary file handling. This method is called when platform is shutting down. It is not intended to be called at any other time under normal circumstances. A side-effect of calling this method is that the contents of the temporary directory managed by this class are deleted.

Since:
2.0

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire