the databuffer is reused so it might contain junk, therefore only use the available amount of bytes (duck)