Package lazyj
Class Utils.Base64Coder
java.lang.Object
java.util.prefs.Preferences
java.util.prefs.AbstractPreferences
lazyj.Utils.Base64Coder
- Enclosing class:
- Utils
- Since:
- Nov 6, 2010
- Author:
- costing (original code from a Sun forum thread that was removed in the mean time)
-
Field Summary
Fields inherited from class java.util.prefs.AbstractPreferences
lock, newNode
Fields inherited from class java.util.prefs.Preferences
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH
-
Method Summary
Modifier and TypeMethodDescriptionprotected String[]
protected AbstractPreferences
static byte[]
Given a String containing a Base64 representation, return the corresponding byte array.static String
encode
(byte[] b) Given a byte array, return its Base64 representation as a String.protected void
flushSpi()
protected String
protected String[]
keysSpi()
void
protected void
protected void
protected void
protected void
syncSpi()
Methods inherited from class java.util.prefs.AbstractPreferences
absolutePath, addNodeChangeListener, addPreferenceChangeListener, cachedChildren, childrenNames, clear, exportNode, exportSubtree, flush, getBoolean, getByteArray, getChild, getDouble, getFloat, getInt, getLong, isRemoved, isUserNode, keys, name, node, nodeExists, parent, putBoolean, putByteArray, putDouble, putFloat, putInt, putLong, remove, removeNode, removeNodeChangeListener, removePreferenceChangeListener, sync, toString
Methods inherited from class java.util.prefs.Preferences
importPreferences, systemNodeForPackage, systemRoot, userNodeForPackage, userRoot
-
Method Details
-
encode
Given a byte array, return its Base64 representation as a String.- Parameters:
b
-- Returns:
- encoded bytes
-
decode
Given a String containing a Base64 representation, return the corresponding byte array.- Parameters:
base64String
-- Returns:
- decoded bytes
-
get
- Overrides:
get
in classAbstractPreferences
-
put
- Overrides:
put
in classAbstractPreferences
-
childSpi
- Specified by:
childSpi
in classAbstractPreferences
-
putSpi
- Specified by:
putSpi
in classAbstractPreferences
-
getSpi
- Specified by:
getSpi
in classAbstractPreferences
-
removeSpi
- Specified by:
removeSpi
in classAbstractPreferences
-
keysSpi
- Specified by:
keysSpi
in classAbstractPreferences
- Throws:
BackingStoreException
-
childrenNamesSpi
- Specified by:
childrenNamesSpi
in classAbstractPreferences
- Throws:
BackingStoreException
-
syncSpi
- Specified by:
syncSpi
in classAbstractPreferences
- Throws:
BackingStoreException
-
removeNodeSpi
- Specified by:
removeNodeSpi
in classAbstractPreferences
- Throws:
BackingStoreException
-
flushSpi
- Specified by:
flushSpi
in classAbstractPreferences
- Throws:
BackingStoreException
-