Check if the incoming data is raw ,in which case convert it to a byte array directly.