public ProtocolVersion(String version){
  if (version == null) {
    throw new IllegalArgumentException("null can not parsed to version");
  }
  Matcher versionMatcher=VERSION_PAT.matcher(version);
  if (versionMatcher.find()) {
    majorVersion=Integer.parseInt(versionMatcher.group(1));
    minorVersion=Integer.parseInt(versionMatcher.group(2));
  }
 else {
    throw new IllegalArgumentException("version: " + version + " not supported");
  }
}

public ProtocolVersion ( String version ) { if ( version == null ) { throw new IllegalArgumentException ( "null can not parsed to version" ) ; } Matcher versionMatcher = VERSION_PAT . matcher ( version ) ; if ( versionMatcher . find ( ) ) { majorVersion = Integer . parseInt ( versionMatcher . group ( 1 ) ) ; minorVersion = Integer . parseInt ( versionMatcher . group ( 2 ) ) ; } else { throw new IllegalArgumentException ( "version: " + version + " not supported" ) ; } }
rfb protocol parser ( rfb ( [ 0 - 9 ] { 3 } ) . ( [ 0 - 9 ] { 3 } ) )
