public InputStream _openInputStream(String fileName) throws IOException {
        Log.log(Log.IO, "open stream: " + fileName);
        
        fileName = concatPath(documentBase, fileName);

            // System.out.println ("concatenated: "+fileName);

        if (isUrl(fileName)) {
            //System.out.println("opening url: " + fileName);
            return new URL(fileName).openStream();
        }
        // try resource

        try { /*
        		       			fileName = fileName.replace('\\', '/');
        		       			 if (!fileName.startsWith("/"))
        		       				 fileName = "/" + fileName;
        		               	*/
            InputStream result = null;

            //System.out.println("Try to use activeClass ...");
            if(activeClass != null) {
        			result = activeClass.getResourceAsStream(fileName);
        			if(result != null) return result;
            }
            
            //System.out.println("Try to use classLoader ...");
            if(classLoader != null) {
                result = classLoader.getResourceAsStream(fileName);
                if(result != null) return result;
            }
            
            //System.out.println("Try to use ApplicationManager  ...");
            result = ApplicationManager.class.getResourceAsStream(fileName);
            if(result != null) return result;
        }
        catch (Exception e) {
        	e.printStackTrace();
        }

        // file otherwise
        //System.out.println("opening file: " + fileName);

        if(applet != null){
            System.out.println("WARNING: Resource not found: "+fileName);
            return null;
        }
        else {
            return new FileInputStream(fileName);
        }
    }