Added static fromBytes method.