logger.log( Level.INFO, "start parsing the file..." );
	protected Module readModule( ModuleParserHandler handler,			InputStream inputStream ) throws DesignFileException	{		assert handler != null;		InputStream internalStream = inputStream;		if ( !inputStream.markSupported( ) )			internalStream = new BufferedInputStream( inputStream );		assert internalStream.markSupported( );		logger.log( Level.INFO, "start parsing the file..." ); //$NON-NLS-1$		String signature = null;		try		{			signature = checkUTFSignature( internalStream, handler					.getFileName( ) );			SAXParserFactory saxParserFactory = SAXParserFactory.newInstance( );			SAXParser parser = saxParserFactory.newSAXParser( );			InputSource inputSource = new InputSource( internalStream );			inputSource.setEncoding( signature );			parser.parse( inputSource, handler );		}		catch ( SAXException e )		{			// output errors to the logger			List errors = handler.getErrorHandler( ).getErrors( );			for ( int i = 0; i < errors.size( ); i++ )			{				Exception exception = (Exception) errors.get( i );				logger.log( Level.SEVERE, exception.getMessage( ) );			}			// Syntax error is found			if ( e.getException( ) instanceof DesignFileException )			{				throw (DesignFileException) e.getException( );			}			// Invalid xml error is found			throw new DesignFileException( handler.getFileName( ), errors, e );		}		catch ( ParserConfigurationException e )		{			throw new DesignFileException( handler.getFileName( ), handler					.getErrorHandler( ).getErrors( ), e );		}		catch ( IOException e )		{			logger.log( Level.SEVERE, "IO error occurs" //$NON-NLS-1$					+ e.getLocalizedMessage( ) );			throw new DesignFileException( handler.getFileName( ), handler					.getErrorHandler( ).getErrors( ), e );		}		Module module = handler.getModule( );		module.setUTFSignature( signature );		module.setValid( true );		logger.log( Level.INFO, "The file has bee parsed successfully." ); //$NON-NLS-1$		return module;	}