/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.hellojrmpiiop.util;

import java.io.*;
import java.security.*;

/**
 *      
 *   @see <related>
 *   @author $Author: starksm $
 *   @version $Revision: 1.1.16.1 $
 */
public class HelloUtil
{
   // Constants -----------------------------------------------------
    
   // Attributes ----------------------------------------------------
   
   // Static --------------------------------------------------------

   // Constructors --------------------------------------------------
   
   // Public --------------------------------------------------------
   public InputStream getResource(final String name, final Object req)
   {
      return (InputStream)AccessController.doPrivileged(new PrivilegedAction()
      {
         public Object run()
         {
            return req.getClass().getClassLoader().getResourceAsStream(name);
         }
      });
   }
}
