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 compareFile( readerA, readerB );
try { goldenFileName = GOLDEN_FOLDER + goldenFileName; outputFileName = getTempFolder( ) + OUTPUT_FOLDER + outputFileName;  readerA = new InputStreamReader( getResourceAStream( goldenFileName ) ); readerB = new FileReader( outputFileName );  same = compareFile( readerA, readerB ); } catch ( IOException e ) { errorText.append( e.toString( ) ); errorText.append( "\n" ); e.printStackTrace( ); } finally { try { if ( readerA != null ) readerA.close( ); if ( readerB != null ) readerB.close( ); } catch ( Exception e ) { readerA = null; readerB = null;  errorText.append( e.toString( ) );  throw new Exception( errorText.toString( ) ); } }  return same;
	protected boolean compareFile( String goldenFileName ) throws Exception	{		goldenFileName = GOLDEN_FOLDER + goldenFileName;		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 compareFile( readerA, readerB );	}