/* Richard A. DeVenezia * SUGI 29 - "Greetings from the Edge" * www.devenezia.com/papers */ //import java.rmi.*; //import java.rmi.server.*; //import java.sql.*; public class DataStepHashAdapterTester { // Test the interface class that SAS will use to access remote databases through JDBC // This client is not designed for use as a java application // main() should only be used for testing purposes public static void main(String[] args){ double handle = 0; java.text.DecimalFormat nf = new java.text.DecimalFormat ("########"); // System.setSecurityManager ( new RMISecurityManager() ); try { DataStepHashAdapter hi = new DataStepHashAdapter(); handle = hi.getHashHandle ( 1000, 0.5 ); System.out.println ("Handle:"+nf.format(handle)); hi.put (handle,1, 1); hi.put (handle,2, "Two"); hi.put (handle,"One", 1); hi.put (handle,"Two", "Two"); System.out.println ("1->"+hi.getDouble(handle,1)); System.out.println ("2->"+hi.getString(handle,2)); System.out.println ("\"One\"->"+hi.getDouble(handle,"One")); System.out.println ("\"Two\"->"+hi.getString(handle,"Two")); hi.freeHashHandle(handle); } catch (Exception e) { System.out.println ("Exception in tester:"+e); e.printStackTrace(); System.exit(1); } System.exit(0); } }