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

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.equinox.security.storage
Class EncodingUtils

java.lang.Object
  extended by 
org.eclipse.equinox.security.storage.EncodingUtils

public final class EncodingUtils
extends Object

Collection of helper methods.

This class is not intended to be instantiated or extended by clients.

Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
EncodingUtils ()
           
 
Method Summary
static byte[] decodeBase64 ( String string)
          Provides decoding of Base64-encoded string
static  String decodeSlashes ( String nodeName)
          Decode strings previously encoded with the encodeSlashes(String) method.
static  String encodeBase64 (byte[] bytes)
          Provides Base64 encoding of the data.
static  String encodeSlashes ( String nodeName)
          Encode strings containing forward slashes so that they can be used as node names with secure preferences.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncodingUtils

public EncodingUtils()
Method Detail

encodeSlashes

public static 
String encodeSlashes(
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, null if argument was null
See Also:
decodeSlashes(String)

decodeSlashes

public static 
String decodeSlashes(
String nodeName)
Decode strings previously encoded with the encodeSlashes(String) method.

Parameters:
nodeName - string to be decoded
Returns:
decoded string, null if argument was null

encodeBase64

public static 
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(
String string)
Provides decoding of Base64-encoded string

Parameters:
string - data encoded as Base64
Returns:
decoded data

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