common/src/main/java/com/genexus/reports/ParseINI.java
/** Obtiene del InputStream el nombre del entry
	 * @param inputStream el InputStreamReader
	 * @return el nombre del entry
	 */
Obtiene del InputStream el nombre del entry
@param inputStream el InputStreamReader
@return el nombre del entry
Obtiene del InputStream el nombre del entry @param inputStream el InputStreamReader @return el nombre del entry
@SuppressWarnings("unchecked")
	private String readEntryName()throws IOException
	{
		int offset=0;
		int car=0;
		while(true && car!=-1)
		{
			switch(car=inputStream.read())
			{
				case '%':  
				case '*':
						 while(true)
						 {
							 car=inputStream.read();
							 if(car=='\n' || car=='\r' || car==-1)break;
						 }
						 break;
				case ' ':  
						 if(entryName==null)throw new IOException("Invalid entry");
						 sectionEntries.put(entryName,(String) sectionEntries.get(entryName) + readEntry());
						 return readEntryName();
				case '[':  
							sectionEntries = new Hashtable();
							String sectionName = readEntry();
							sectionName=sectionName.substring(0,sectionName.length()-1);
							sections.put(sectionName,sectionEntries);
							entryName=null;
							return readEntryName();
				case '\n':
				case -1:
				case '\r': break;
				default:   
						tempBytes[offset++]=car;
						while(true)
						{
							car=inputStream.read();
							if(/*Character.isWhitespace((char)car) ||*/
							car==':' || car=='=' || car==-1)break;
							else tempBytes[offset++]=car;
						}
						if(offset==4 &&         
						   tempBytes[0]=='N' &&
						   tempBytes[1]=='a' &&
						   tempBytes[2]=='m' &&
						   tempBytes[3]=='e')
						{
							sectionEntries=new Hashtable();
							String section=readEntry();
							if(section.startsWith("./"))section=section.substring(2);
							sections.put(section,sectionEntries);
							entryName=null;
							return readEntryName();
						}
						else
						{
							return new String(tempBytes,0,offset);
						}
			}
		}
		return null;
	}
@ SuppressWarnings ( "unchecked" ) private String readEntryName ( ) throws IOException { int offset = 0 ; int car = 0 ; while ( true && car != - 1 ) { switch ( car = inputStream . read ( ) ) { case '%' : case '*' : while ( true ) { car = inputStream . read ( ) ; if ( car == '\n' || car == '\r' || car == - 1 ) break ; } break ; case ' ' : if ( entryName == null ) throw new IOException ( "Invalid entry" ) ; sectionEntries . put ( entryName , ( String ) sectionEntries . get ( entryName ) + readEntry ( ) ) ; return readEntryName ( ) ; case '[' : sectionEntries = new Hashtable ( ) ; String sectionName = readEntry ( ) ; sectionName = sectionName . substring ( 0 , sectionName . length ( ) - 1 ) ; sections . put ( sectionName , sectionEntries ) ; entryName = null ; return readEntryName ( ) ; case '\n' : case - 1 : case '\r' : break ; default : tempBytes [ offset ++ ] = car ; while ( true ) { car = inputStream . read ( ) ; if ( /*Character.isWhitespace((char)car) ||*/ car == ':' || car == '=' || car == - 1 ) break ; else tempBytes [ offset ++ ] = car ; } if ( offset == 4 && tempBytes [ 0 ] == 'N' && tempBytes [ 1 ] == 'a' && tempBytes [ 2 ] == 'm' && tempBytes [ 3 ] == 'e' ) { sectionEntries = new Hashtable ( ) ; String section = readEntry ( ) ; if ( section . startsWith ( "./" ) ) section = section . substring ( 2 ) ; sections . put ( section , sectionEntries ) ; entryName = null ; return readEntryName ( ) ; } else { return new String ( tempBytes , 0 , offset ) ; } } } return null ; }
Obtiene del InputStream el nombre del entry
 @param inputStream el InputStreamReader
 @return el nombre del entry
Obtiene del InputStream el nombre del entry @param inputStream el InputStreamReader @return el nombre del entry
// Comentarios // Continuaci�n del entry anterior -> se concatena con el entry que ya se estaba procesando // Comienza nueva seccion // Tomo entry // Chequeo si es nueva Seccion