update format protocol from java real codes