/** * locate an agent giving a transaction Image * @param b a transaction image * @return given agent * @exception CardAgentNotFoundException */ synchronized public static CardAgent getAgent (byte[] b) throws CardAgentNotFoundException { try { ByteArrayInputStream i = new ByteArrayInputStream (b); ObjectInputStream o = new ObjectInputStream (i); int id = o.readInt(); return getAgent (id); } catch (Exception e) { } throw new CardAgentNotFoundException (); }