public static void remove ( ) { final String current = System . getProperties ( ) . getProperty ( HANDLER_PKGS , "" ) ; // Only one if ( current . equals ( PKG ) ) { System . getProperties ( ) . put ( HANDLER_PKGS , "" ) ; return ; } // Middle String token = "|" + PKG + "|" ; int idx = current . indexOf ( token ) ; if ( idx > - 1 ) { final String removed = current . substring ( 0 , idx ) + "|" + current . substring ( idx + token . length ( ) ) ; System . getProperties ( ) . put ( HANDLER_PKGS , removed ) ; return ; } // Beginning token = PKG + "|" ; idx = current . indexOf ( token ) ; if ( idx > - 1 ) { final String removed = current . substring ( idx + token . length ( ) ) ; System . getProperties ( ) . put ( HANDLER_PKGS , removed ) ; return ; } // End token = "|" + PKG ; idx = current . indexOf ( token ) ; if ( idx > - 1 ) { final String removed = current . substring ( 0 , idx ) ; System . getProperties ( ) . put ( HANDLER_PKGS , removed ) ; return ; } }
Removes the protocol handler .