private static Wallet readKeys(@Nonnull final InputStream is) throws IOException { final BufferedReader in = new BufferedReader(new InputStreamReader(is, Constants.UTF_8)); final List<ECKey> keys = WalletUtils.readKeys(in); in.close(); final Wallet wallet = new Wallet(Constants.NETWORK_PARAMETERS); for (final ECKey key : keys) wallet.addKey(key); return wallet; }