}
for (Field f : res) {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
String field = null;
try {
mw.writeField(f, bos);
// writeField always ends with CRLF and we don't want it.
byte[] fieldbytes = bos.toByteArray();
field = new String(fieldbytes, 0, fieldbytes.length - 2);
} catch (IOException e) {
}