|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.internal.baseadaptor.AdaptorUtil
public class AdaptorUtil
A utility class with some generally useful static methods for adaptor hook implementations
| Field Summary | |
|---|---|
static byte |
NULL
The NULL tag used in bundle storage |
static byte |
OBJECT
The OBJECT tag used in bundle storage |
| Constructor Summary | |
|---|---|
AdaptorUtil()
|
|
| Method Summary | |
|---|---|
static boolean |
canWrite(java.io.File installDir)
|
static void |
copyDir(java.io.File inDir,
java.io.File outDir)
Does a recursive copy of one directory to another. |
static java.net.URL |
encodeFileURL(java.io.File file)
|
static java.util.Dictionary<java.lang.String,java.lang.String> |
loadManifestFrom(BaseData bundledata)
|
static Version |
loadVersion(java.io.DataInputStream in)
|
static void |
readFile(java.io.InputStream in,
java.io.File file)
Read a file from an InputStream and write it to the file system. |
static java.lang.String |
readString(java.io.DataInputStream in,
boolean intern)
|
static ServiceRegistration<?> |
register(java.lang.String name,
java.lang.Object service,
BundleContext context)
Register a service object. |
static boolean |
rm(java.io.File file)
This function performs the equivalent of "rm -r" on a file or directory. |
static void |
writeStringOrNull(java.io.DataOutputStream out,
java.lang.String string)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final byte NULL
public static final byte OBJECT
| Constructor Detail |
|---|
public AdaptorUtil()
| Method Detail |
|---|
public static void copyDir(java.io.File inDir,
java.io.File outDir)
throws java.io.IOException
inDir - input directory to copy.outDir - output directory to copy to.
java.io.IOException - if any error occurs during the copy.
public static void readFile(java.io.InputStream in,
java.io.File file)
throws java.io.IOException
in - InputStream from which to read. This stream will be closed by this method.file - output file to create.
java.io.IOExceptionpublic static boolean rm(java.io.File file)
file - file or directory to delete
public static java.lang.String readString(java.io.DataInputStream in,
boolean intern)
throws java.io.IOException
java.io.IOException
public static void writeStringOrNull(java.io.DataOutputStream out,
java.lang.String string)
throws java.io.IOException
java.io.IOException
public static Version loadVersion(java.io.DataInputStream in)
throws java.io.IOException
java.io.IOException
public static ServiceRegistration<?> register(java.lang.String name,
java.lang.Object service,
BundleContext context)
name - the service class nameservice - the service objectcontext - the registering bundle context
public static java.util.Dictionary<java.lang.String,java.lang.String> loadManifestFrom(BaseData bundledata)
throws BundleException
BundleExceptionpublic static boolean canWrite(java.io.File installDir)
public static java.net.URL encodeFileURL(java.io.File file)
throws java.net.MalformedURLException
java.net.MalformedURLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||