svc.out.writeBuffer(spb.toByteArray()); svc.out.writeBuffer(srb.toByteArray());
svc.out.writeBuffer(spb != null ? spb.toByteArray() : null); svc.out.writeBuffer(srb != null ? srb.toByteArray() : null);
	public void iscServiceQuery(IscSvcHandle serviceHandle,			ServiceParameterBuffer serviceParameterBuffer,			ServiceRequestBuffer serviceRequestBuffer, byte[] resultBuffer)			throws GDSException {		isc_svc_handle_impl svc = (isc_svc_handle_impl) serviceHandle;		ServiceParameterBufferImp spb = (ServiceParameterBufferImp) serviceParameterBuffer;		ServiceRequestBufferImp srb = (ServiceRequestBufferImp) serviceRequestBuffer;		if (svc == null || svc.out == null)			throw new GDSException(ISCConstants.isc_bad_svc_handle);		try {			svc.out.writeInt(op_service_info);			svc.out.writeInt(svc.getHandle());			svc.out.writeInt(0);			svc.out.writeBuffer(spb.toByteArray());			svc.out.writeBuffer(srb.toByteArray());			svc.out.writeInt(resultBuffer.length);			svc.out.flush();			receiveResponse(svc, -1);			int toCopy = Math.min(resultBuffer.length,					svc.getResp_data().length);			System.arraycopy(svc.getResp_data(), 0, resultBuffer, 0, toCopy);		} catch (IOException ex) {			if (log != null && log.isDebugEnabled())				log.warn("IOException in isc_service_query", ex);			// ex.getMessage() makes little sense here, it will not be displayed			// because error message for isc_net_read_err does not accept params			throw new GDSException(ISCConstants.isc_arg_gds,					ISCConstants.isc_net_read_err, ex.getMessage());		}	}