static public HTTPAuthStore // public to allow testing getDeserializedStore(ObjectInputStream ois) throws HTTPException { List<Entry> entries = getDeserializedEntries(ois); HTTPAuthStore store = new HTTPAuthStore(); store.rows = entries; return store; }
synchronized public void deserialize(InputStream istream, String password) throws HTTPException { ObjectInputStream ois = null; try { ois = openobjectstream(istream, password); List<Entry> entries = getDeserializedEntries(ois); for(Entry e : entries) { insert(e); } } finally { if(ois != null) try { ois.close(); } catch (IOException e) {/*ignore*/} } }