private void writeString( String readString, final MapOrListWriterImpl writer, String fieldName, boolean isList) { int length; byte[] strBytes; try { strBytes = readString.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { throw new DrillRuntimeException("Unable to read string value for field: " + fieldName, e); } length = strBytes.length; ensure(length); workBuf.setBytes(0, strBytes); final VarCharHolder vh = new VarCharHolder(); vh.buffer = workBuf; vh.start = 0; vh.end = length; if (isList == false) { writer.varChar(fieldName).write(vh); } else { writer.list.varChar().write(vh); } }