assertTrue( "Looks like the backup failed. See logfile "+outputFilename, stringBuffer.indexOf("closing file, committing, and finishing.") != -1 );
assertTrue( "Looks like the backup failed. See logfile "+outputFilename, stringBuffer.toString().indexOf("closing file, committing, and finishing.") != -1 );
    private void queryService(final GDS gds, final isc_svc_handle handle, String outputFilename) throws Exception, IOException        {        final ServiceRequestBuffer serviceRequestBuffer = gds.newServiceRequestBuffer(ISCConstants.isc_info_svc_to_eof);        final byte[] buffer = new byte[1024];		final StringBuffer stringBuffer = new StringBuffer();        boolean finished = false;        final FileOutputStream file = new FileOutputStream(outputFilename);        try			{			while(finished==false)				{				gds.isc_service_query(handle, null, serviceRequestBuffer, buffer);					final ByteArrayInputStream byteArrayInputStream  = new ByteArrayInputStream(buffer);					final byte firstByte = (byte) byteArrayInputStream.read();					int numberOfBytes = (short)((byteArrayInputStream.read() << 0) + (byteArrayInputStream.read() << 8));					if(numberOfBytes==0)					{					 if(byteArrayInputStream.read() != ISCConstants.isc_info_end)						 throw new Exception("Expect ISCConstants.isc_info_end here");						finished = true;					}				else					{					for(; numberOfBytes >= 0; numberOfBytes--)						{						final byte  byteToWrite = (byte)byteArrayInputStream.read();												file.write(byteToWrite);						stringBuffer.append((char)byteToWrite);						}					}					file.flush();				}			}		finally			{					file.close();			}        assertTrue( "Looks like the backup failed. See logfile "+outputFilename, stringBuffer.indexOf("closing file, committing, and finishing.") != -1 );        }