Code example for InputStream

Methods: close

0
		Context ctx = getContext();
		 
		AssetManager am = ctx.getAssets();
		InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
		 
		Importer importer = ImporterFactory.createImporter(is);
		 
		assertTrue(importer instanceof ImporterV4);
		is.close();
		 
	} 
	 
	public void testParsing() throws IOException, InvalidDBException { 
		Context ctx = getContext();
		 
		AssetManager am = ctx.getAssets();
		InputStream is = am.open("test.kdbx", AssetManager.ACCESS_STREAMING);
		 
		ImporterV4 importer = new ImporterV4();
		importer.openDatabase(is, "12345", "");