@Override
public byte[] receive() throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
do {
GetDepDataResp getDepDataResp = tamaCommunicator.sendMessage(new GetDepDataReq());
out.write(getDepDataResp.getDataIn(), 0, getDepDataResp.getDataIn().length);
log.debug("Data received: " + (getDepDataResp.getDataIn().length) + " More Information: "
+ getDepDataResp.isMoreInformation());
log.debug("Received data: " + NfcUtils.convertBinToASCII(getDepDataResp.getDataIn()));
if (!getDepDataResp.isMoreInformation()) {
// tamaCommunicator.sendMessage(new SetDepDataReq(new byte[0], 0, 0));
break;
}
} while (true);
return out.toByteArray();