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, newNodeFields inherited from class java.util.prefs.Preferences
MAX_KEY_LENGTH, MAX_NAME_LENGTH, MAX_VALUE_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionprotected String[]protected AbstractPreferencesstatic byte[]Given a String containing a Base64 representation, return the corresponding byte array.static Stringencode(byte[] b) Given a byte array, return its Base64 representation as a String.protected voidflushSpi()protected Stringprotected String[]keysSpi()voidprotected voidprotected voidprotected voidprotected voidsyncSpi()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, toStringMethods 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:
getin classAbstractPreferences
-
put
- Overrides:
putin classAbstractPreferences
-
childSpi
- Specified by:
childSpiin classAbstractPreferences
-
putSpi
- Specified by:
putSpiin classAbstractPreferences
-
getSpi
- Specified by:
getSpiin classAbstractPreferences
-
removeSpi
- Specified by:
removeSpiin classAbstractPreferences
-
keysSpi
- Specified by:
keysSpiin classAbstractPreferences- Throws:
BackingStoreException
-
childrenNamesSpi
- Specified by:
childrenNamesSpiin classAbstractPreferences- Throws:
BackingStoreException
-
syncSpi
- Specified by:
syncSpiin classAbstractPreferences- Throws:
BackingStoreException
-
removeNodeSpi
- Specified by:
removeNodeSpiin classAbstractPreferences- Throws:
BackingStoreException
-
flushSpi
- Specified by:
flushSpiin classAbstractPreferences- Throws:
BackingStoreException
-