/** * Save the data of the sample result to a stream * * @param writer * stream to save objects into * @param context * context for xstream to allow nested objects * @param res * sample to be saved * @param save * configuration telling us what to save */ protected void saveSamplerData(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveSamplerData(res)) { writeString(writer, TAG_SAMPLER_DATA, res.getSamplerData()); } if (save.saveUrl()) { final URL url = res.getURL(); if (url != null) { writeItem(url, context, writer); } } }
private void saveSamplerData(HierarchicalStreamWriter writer, MarshallingContext context, HTTPSampleResult res, SampleSaveConfiguration save) { if (save.saveSamplerData(res)) { writeString(writer, TAG_COOKIES, res.getCookies()); writeString(writer, TAG_METHOD, res.getHTTPMethod()); writeString(writer, TAG_QUERY_STRING, res.getQueryString()); writeString(writer, TAG_REDIRECT_LOCATION, res.getRedirectLocation()); } if (save.saveUrl()) { writeItem(res.getURL(), context, writer); } }