int len = dis.readInt();
if (len > valuebytes.length) {
valuebytes = new byte[len];
}
dis.readFully(valuebytes, 0, len);
DecoderFactory decoderFactory = new DecoderFactory();
Decoder d = decoderFactory.binaryDecoder(new ByteArrayInputStream(valuebytes, 0, len), null);
// Read the data
SpecificDatumReader<Beacon> sdr = new SpecificDatumReader<Beacon>(writerSchema, Beacon.SCHEMA$);
Beacon read = sdr.read(null, d);
beaconFAB.put(row, read);
}