ByteArrayFrameField::ByteArrayFrameField(DataStream &input, ReadType type) : m_readType(type) { uint8_t byte; switch (m_readType) { case AVAILABLE: while (!input.atEnd()) { input >> byte; m_data.append(byte); } break; case LEN_DEF_8BIT: uint8_t length; input >> length; for (uint8_t i = 0; i < length; i++) { input >> byte; m_data.append(byte); } break; default: break; } }