com.zphinx.spine.utils
Class MessagePropertyBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by java.util.PropertyResourceBundle
          extended by com.zphinx.spine.utils.MessagePropertyBundle

public abstract class MessagePropertyBundle
extends PropertyResourceBundle

MessagePropertyBundle adds the ability to store a ResourceBundle back to it's original location in its original format.ResourceBundles are normally read only objects of which data storage is not possible.

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Nested Class Summary
protected static class MessagePropertyBundle.BundlePriviledge
          BundlePriviledge is a minimal implementation of PrivilegedAction used to create a secure resource URL.
 
Field Summary
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
MessagePropertyBundle(InputStream stream)
          Public Constructor
 
Method Summary
static void saveStream(String className, Locale locale, Properties props)
          Gets the outputStream used to store the properties object
 void store(OutputStream out, Properties props)
          Saves the properties object
 
Methods inherited from class java.util.PropertyResourceBundle
getKeys, handleGetObject
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessagePropertyBundle

public MessagePropertyBundle(InputStream stream)
                      throws IOException
Public Constructor

Parameters:
stream - The input stream from which a bundle is retrieved
Throws:
IOException - Throw an IOException if an error occurs
Method Detail

store

public void store(OutputStream out,
                  Properties props)
Saves the properties object

Parameters:
out - The outputStream to use
props - The properties object to store

saveStream

public static void saveStream(String className,
                              Locale locale,
                              Properties props)
                       throws SpineException
Gets the outputStream used to store the properties object

Parameters:
className - The fullName of the properties file
locale - The Locale of the properties file to load
props - The properties object to use
Throws:
SpineException