How to read mavlink package .. is it ok to do it on my way?

i reading about MAVlink and i try to read packages from pixhawk fly controller.
I thought of another way to make the call and i want to know from this discussions readers if its ok and what are you think
On my reader … i read the two first byte from the pixhawk.
The second byte need to be the PAYLOAD length → so new i know that i need to read the 4 bytes of the header + PAYLOAD length bytes + 2 chcksub bytes.
So after reading the PAYLOAD length i define a byte array → size is ( PAYLOAD.length + 4 + 2 ) and read from the serial to this buffer.
Is it ok to do it ?