@Override public StringValue readRecord(StringValue reuse, byte[] bytes, int offset, int numBytes) { if (this.ascii) { reuse.setValueAscii(bytes, offset, numBytes); return reuse;
if (bytes[i] == encaps) { if (bytes[i+1] == delim) { field.setValueAscii(bytes, startPos, i-startPos+1); return i+2; for (i = startPos; i < limit; i++) { if (bytes[i] == delim) { field.setValueAscii(bytes, startPos, i-startPos); return i+1; field.setValueAscii(bytes, startPos, i-startPos); return i+1; } else {
reusable.setValueAscii(bytes, quoteStart, i-quoteStart); reusable.setValueAscii(bytes, startPos, i-startPos); return (i == length ? length : i+1);
reusable.setValueAscii(bytes, quoteStart, i-quoteStart); reusable.setValueAscii(bytes, startPos, i-startPos); return (i == length ? length : i+1);
str.setValueAscii(bytes, offset, numBytes);
@Override public Record readRecord(Record target, byte[] bytes, int offset, int numBytes) { this.keyString.setValueAscii(bytes, offset, 1); this.valueString.setValueAscii(bytes, offset + 2, 1); target.setField(0, keyString); target.setField(1, valueString); if (LOG.isDebugEnabled()) LOG.debug("Read in: [" + keyString.getValue() + "," + valueString.getValue() + "]"); return target; } }
@Override public Record readRecord(Record target, byte[] bytes, int offset, int numBytes) { this.keyString.setValueAscii(bytes, offset, 1); this.valueString.setValueAscii(bytes, offset + 2, 1); target.setField(0, keyString); target.setField(1, valueString); LOG.debug("Read in: [" + keyString.getValue() + "," + valueString.getValue() + "]"); return target; }