//Create and install a security manager
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
byte [] aPattern = { (byte)1011 };
try {
HelloImpl obj = new HelloImpl("xor", aPattern);
//HelloImpl obj = new HelloImpl("compression", null);
Naming.rebind("/HelloServer", obj);
System.out.println("HelloServer bound in registry");
} catch (Exception e) {
System.out.println("HelloImpl err: " + e.getMessage());
e.printStackTrace();
}