@SuppressWarnings("deprecation") @Override public void fill(BooleanOption option) throws CsvFormatException, IOException { seekBuffer(); if (lineBuffer.hasRemaining()) { boolean value = trueFormat.contentEquals(lineBuffer); option.modify(value); } else { option.setNull(); } }
@SuppressWarnings("deprecation") private void restore(byte field) throws IOException { if (field == SERIALIZE_NULL) { setNull(); } else if (field == SERIALIZE_TRUE) { modify(true); } else if (field == SERIALIZE_FALSE) { modify(false); } else { throw new IOException(MessageFormat.format( "Cannot restore a boolean field ({0})", field)); } }
emitter.endRecord(); value.setNull(); emitter.emit(value); value.modify(true);