common/src/main/java/com/genexus/GXJarClassLoader.java
/** Obtiene los bytes de la clase desde el JAR o del directorio
     */
Obtiene los bytes de la clase desde el JAR o del directorio
Obtiene los bytes de la clase desde el JAR o del directorio
private byte[] loadBytes(String className) 
	{
		byte[] result = null;
		className = className.replace('.', '/') + ".class";
        if(DEBUG)
            System.out.println("## GXJarClassLoader: Loading class: " + className + " [" + source + "]");
        try
        {
            if(sourceIsJAR)
            { 
                ZipEntry theEntry;
                if((theEntry = zipFile.getEntry(className)) != null)
                {
                    result = new byte[(int)theEntry.getSize()];
                    InputStream theStream = zipFile.getInputStream(theEntry);
                    new DataInputStream(new BufferedInputStream(theStream)).readFully(result);
                    theStream.close();
                }
            }
            else
            { 
                File theFile = new File(source + File.separator + className);
                if(theFile.exists())
                {
                    result = new byte[(int)theFile.length()];
                    FileInputStream theStream = new FileInputStream(theFile);
                    new DataInputStream(new BufferedInputStream(theStream)).readFully(result);
                    theStream.close();
                    classTimeStamps.put(className, new Long(theFile.lastModified()));
                }
            }
        }catch(IOException e) { ; }
		return result;
	}
private byte [ ] loadBytes ( String className ) { byte [ ] result = null ; className = className . replace ( '.' , '/' ) + ".class" ; if ( DEBUG ) System . out . println ( "## GXJarClassLoader: Loading class: " + className + " [" + source + "]" ) ; try { if ( sourceIsJAR ) { ZipEntry theEntry ; if ( ( theEntry = zipFile . getEntry ( className ) ) != null ) { result = new byte [ ( int ) theEntry . getSize ( ) ] ; InputStream theStream = zipFile . getInputStream ( theEntry ) ; new DataInputStream ( new BufferedInputStream ( theStream ) ) . readFully ( result ) ; theStream . close ( ) ; } } else { File theFile = new File ( source + File . separator + className ) ; if ( theFile . exists ( ) ) { result = new byte [ ( int ) theFile . length ( ) ] ; FileInputStream theStream = new FileInputStream ( theFile ) ; new DataInputStream ( new BufferedInputStream ( theStream ) ) . readFully ( result ) ; theStream . close ( ) ; classTimeStamps . put ( className , new Long ( theFile . lastModified ( ) ) ) ; } } } catch ( IOException e ) { ; } return result ; }
Obtiene los bytes de la clase desde el JAR o del directorio
Obtiene los bytes de la clase desde el JAR o del directorio
// Si el source se trata de un .JAR
 // OK, si es un directorio
