try { goldenFileName = getClassFolder( ) + GOLDEN_FOLDER + goldenFileName; outputFileName = getClassFolder( ) + OUTPUT_FOLDER + outputFileName;  readerA = new FileReader( goldenFileName ); readerB = new FileReader( outputFileName );  same = compareTextFile( readerA, readerB ); } catch ( IOException e ) { errorText.append( e.toString( ) ); errorText.append( "\n" ); e.printStackTrace( ); } finally { try { readerA.close( ); readerB.close( ); } catch ( Exception e ) { readerA = null; readerB = null;  errorText.append( e.toString( ) );  throw new Exception( errorText.toString( ) ); } }  return same;
InputStream streamA = getResourceAStream( goldenFileName ); if ( os == null ) return false; InputStream streamB = new ByteArrayInputStream( os.toByteArray( ) ); InputStreamReader readerA = new InputStreamReader( streamA ); InputStreamReader readerB = new InputStreamReader( streamB ); return compareTextFile( readerA, readerB );
	protected boolean compareTextFile( String goldenFileName,			String outputFileName ) throws Exception	{		FileReader readerA = null;		FileReader readerB = null;		boolean same = true;		StringBuffer errorText = new StringBuffer( );		try		{			goldenFileName = getClassFolder( ) + GOLDEN_FOLDER + goldenFileName;			outputFileName = getClassFolder( ) + OUTPUT_FOLDER + outputFileName;			readerA = new FileReader( goldenFileName );			readerB = new FileReader( outputFileName );			same = compareTextFile( readerA, readerB );		}		catch ( IOException e )		{			errorText.append( e.toString( ) );			errorText.append( "\n" ); //$NON-NLS-1$			e.printStackTrace( );		}		finally		{			try			{				readerA.close( );				readerB.close( );			}			catch ( Exception e )			{				readerA = null;				readerB = null;				errorText.append( e.toString( ) );				throw new Exception( errorText.toString( ) );			}		}		return same;	}