Class EncodingUtils
- java.lang.Object
-
- org.eclipse.equinox.security.storage.EncodingUtils
-
public final class EncodingUtils extends java.lang.ObjectCollection of helper methods.This class is not intended to be instantiated or extended by clients.
-
-
Constructor Summary
Constructors Constructor Description EncodingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]decodeBase64(java.lang.String string)Provides decoding of Base64-encoded stringstatic java.lang.StringdecodeSlashes(java.lang.String nodeName)Decode strings previously encoded with theencodeSlashes(String)method.static java.lang.StringencodeBase64(byte[] bytes)Provides Base64 encoding of the data.static java.lang.StringencodeSlashes(java.lang.String nodeName)Encode strings containing forward slashes so that they can be used as node names with secure preferences.
-
-
-
Method Detail
-
encodeSlashes
public static java.lang.String encodeSlashes(java.lang.String nodeName)
Encode strings containing forward slashes so that they can be used as node names with secure preferences. It is the responsibility of the consumer to manually encode such strings before attempting to obtain corresponding nodes from secure preferences.Internally, the class uses a subset of JIT encoding. The forward slashes and backward slashes are encoded.
- Parameters:
nodeName- string to be encoded- Returns:
- encoded string,
nullif argument wasnull - See Also:
decodeSlashes(String)
-
decodeSlashes
public static java.lang.String decodeSlashes(java.lang.String nodeName)
Decode strings previously encoded with theencodeSlashes(String)method.- Parameters:
nodeName- string to be decoded- Returns:
- decoded string,
nullif argument wasnull
-
encodeBase64
public static java.lang.String encodeBase64(byte[] bytes)
Provides Base64 encoding of the data. This Base64 encoding does not insert end-of-line characters (but can properly decode strings with EOLs inserted).- Parameters:
bytes- data to be encoded- Returns:
- data encoded as Base64 string
-
decodeBase64
public static byte[] decodeBase64(java.lang.String string)
Provides decoding of Base64-encoded string- Parameters:
string- data encoded as Base64- Returns:
- decoded data
-
-