public class Util extends Object
Constructor and Description |
---|
Util() |
Modifier and Type | Method and Description |
---|---|
static int |
getGlobalLogLevel(org.osgi.framework.BundleContext context)
Returns the log level as defined in the BundleContext or System properties.
|
static void |
jarDir(File directory,
File zipName)
Jar up a directory
|
static void |
jarDir(File directory,
OutputStream os) |
static long |
loadChecksum(org.osgi.framework.Bundle b,
org.osgi.framework.BundleContext bc)
Returns the stored checksum of the bundle.
|
static void |
log(org.osgi.framework.BundleContext context,
int logLevel,
int msgLevel,
String message,
Throwable e) |
static void |
log(org.osgi.framework.BundleContext context,
int msgLevel,
String message,
Throwable e)
Log a message and optional throwable.
|
static void |
storeChecksum(org.osgi.framework.Bundle b,
long checksum,
org.osgi.framework.BundleContext bc)
Stores the checksum into a bundle data file.
|
static void |
zipDir(File directory,
ZipOutputStream zos,
String path,
Set<String> exclusions)
Zip up a directory path
|
public static int getGlobalLogLevel(org.osgi.framework.BundleContext context)
context
- BundleContext
of the FileInstall bundle.Logger#LOG_ERROR
.public static void log(org.osgi.framework.BundleContext context, int msgLevel, String message, Throwable e)
message
- The message to loge
- The throwable to logpublic static void log(org.osgi.framework.BundleContext context, int logLevel, int msgLevel, String message, Throwable e)
public static void jarDir(File directory, File zipName) throws IOException
IOException
public static void jarDir(File directory, OutputStream os) throws IOException
IOException
public static void zipDir(File directory, ZipOutputStream zos, String path, Set<String> exclusions) throws IOException
IOException
public static void storeChecksum(org.osgi.framework.Bundle b, long checksum, org.osgi.framework.BundleContext bc)
b
- The bundle whose checksum must be storedchecksum
- the lastModified date to be stored in bcbc
- the FileInstall's bundle context where to store the checksum.public static long loadChecksum(org.osgi.framework.Bundle b, org.osgi.framework.BundleContext bc)
b
- the bundle whose checksum must be returnedbc
- the FileInstall's bundle context.Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.