org.apache.felix.bundlerepository
Class Util
java.lang.Object
org.apache.felix.bundlerepository.Util
public class Util
- extends java.lang.Object
Constructor Summary |
Util()
|
Method Summary |
static java.lang.String |
base64Encode(java.lang.String s)
|
static int |
compareVersion(int[] v1,
int[] v2)
|
static java.lang.String |
encode(byte[] in,
int len)
Encode a raw byte array to a Base64 String. |
static void |
encode(java.io.InputStream in,
java.io.OutputStream out,
int len)
|
static java.lang.String |
getBundleName(org.osgi.framework.Bundle bundle)
|
static java.lang.String |
getClassName(java.lang.String className)
|
static java.lang.String[] |
parseDelimitedString(java.lang.String value,
java.lang.String delim)
Parses delimited string and returns an array containing the tokens. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Util
public Util()
getClassName
public static java.lang.String getClassName(java.lang.String className)
getBundleName
public static java.lang.String getBundleName(org.osgi.framework.Bundle bundle)
parseDelimitedString
public static java.lang.String[] parseDelimitedString(java.lang.String value,
java.lang.String delim)
- Parses delimited string and returns an array containing the tokens. This
parser obeys quotes, so the delimiter character will be ignored if it is
inside of a quote. This method assumes that the quote character is not
included in the set of delimiter characters.
- Parameters:
value
- the delimited string to parse.delim
- the characters delimiting the tokens.
- Returns:
- an array of string tokens or null if there were no tokens.
compareVersion
public static int compareVersion(int[] v1,
int[] v2)
base64Encode
public static java.lang.String base64Encode(java.lang.String s)
throws java.io.IOException
- Throws:
java.io.IOException
encode
public static java.lang.String encode(byte[] in,
int len)
throws java.io.IOException
- Encode a raw byte array to a Base64 String.
- Parameters:
in
- Byte array to encode.len
- Length of Base64 lines. 0 means no line breaks.
- Throws:
java.io.IOException
encode
public static void encode(java.io.InputStream in,
java.io.OutputStream out,
int len)
throws java.io.IOException
- Throws:
java.io.IOException