Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.apache.xerces.util;
 
 
 public class SAXMessageFormatter
 {
  public static String formatMessage(Locale paramLocaleString paramStringObject[] paramArrayOfObject)
  {
    ResourceBundle localResourceBundle = null;
    if (paramLocale != null)
      localResourceBundle = ResourceBundle.getBundle("org.apache.xerces.impl.msg.SAXMessages", paramLocale);
    else
      localResourceBundle = ResourceBundle.getBundle("org.apache.xerces.impl.msg.SAXMessages");
    String str;
    try
    {
      str = localResourceBundle.getString(paramString);
      if (paramArrayOfObject != null)
        try
        {
          str = MessageFormat.format(str, paramArrayOfObject);
        }
        catch (Exception localException)
        {
          str = localResourceBundle.getString("FormatFailed");
          str = str + " " + localResourceBundle.getString(paramString);
        }
    }
    catch (MissingResourceException localMissingResourceException)
    {
      str = localResourceBundle.getString("BadMessageKey");
      throw new MissingResourceException(paramString, str, paramString);
    }
    if (str == null)
    {
      str = paramString;
      if (paramArrayOfObject.length > 0)
      {
        StringBuffer localStringBuffer = new StringBuffer(str);
        localStringBuffer.append('?');
        for (int i = 0; i < paramArrayOfObject.length; i++)
        {
          if (i > 0)
            localStringBuffer.append('&');
          localStringBuffer.append(String.valueOf(paramArrayOfObject[i]));
        }
      }
    }
    return str;
  }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.apache.xerces.util.SAXMessageFormatter
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X