{"id":17066815,"url":"https://github.com/fabianterhorst/floppy","last_synced_at":"2025-06-15T18:40:10.511Z","repository":{"id":46697571,"uuid":"68538290","full_name":"FabianTerhorst/Floppy","owner":"FabianTerhorst","description":"Fast object key value storage for Java with much support for Android","archived":false,"fork":false,"pushed_at":"2017-08-16T15:58:14.000Z","size":196,"stargazers_count":82,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T18:31:57.517Z","etag":null,"topics":["android","android-database-api","java","storage"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FabianTerhorst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-18T18:05:54.000Z","updated_at":"2022-11-29T16:52:03.000Z","dependencies_parsed_at":"2022-08-03T07:17:44.707Z","dependency_job_id":null,"html_url":"https://github.com/FabianTerhorst/Floppy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/FabianTerhorst/Floppy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianTerhorst%2FFloppy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianTerhorst%2FFloppy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianTerhorst%2FFloppy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianTerhorst%2FFloppy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FabianTerhorst","download_url":"https://codeload.github.com/FabianTerhorst/Floppy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FabianTerhorst%2FFloppy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260029892,"owners_count":22948250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-database-api","java","storage"],"created_at":"2024-10-14T11:08:26.051Z","updated_at":"2025-06-15T18:40:10.489Z","avatar_url":"https://github.com/FabianTerhorst.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Floppy\nFast key value storage for Java with much support for Android\n\n\u003ca href=\"http://www.methodscount.com/?lib=io.fabianterhorst%3AFloppy%3A0.2.6\"\u003e\u003cimg src=\"https://img.shields.io/badge/Methods and size-core: 96 | deps: 1693 | 11 KB-e91e63.svg\"/\u003e\u003c/a\u003e\n\n\n```java\nFloppy.init(getFilesDir().toString());\n//Without cache\nDisk disk = Floppy.disk();\n//With cache\nDisk disk = Floppy.memoryDisk();\n//Without cache, with custom name\nDisk disk = Floppy.disk(\"custom disk\");\n//With cache, with custom name\nDisk disk = Floppy.memoryDisk(\"custom memory disk\");\ndisk.write(\"key\", object);\ndisk.read(\"key\");\ndisk.delete(\"key\");\ndisk.deleteAll();\ndisk.setOnWriteListener(\"testKey\", new OnWriteListener\u003cString\u003e() {\n  @Override\n  public void onWrite(String value) {\n      //value = test\n  }\n});\ndisk.write(\"testKey\", \"test\");\n```\n## Array support\nThe array support is internally a memory disk\n```java\n//Without custom name\nArrayDisk disk = Floppy.arrayDisk();\n//With custom name\nArrayDisk disk = Floppy.arrayDisk(\"custom array disk\");\ndisk.addOnChangeListener(\"items\", new OnChangeListener\u003cItem\u003e() {\n  @Override\n  public void onChange(Item item, int index) {\n    //item changed\n  }\n});\nItem item = new Item();\ndisk.addItem(\"items\", item);\nint index = 5;\ndisk.removeItem(\"items\", index);\n//To find the right item in the array (is used in change and remove item)\ndisk.addOnEqualListener(\"items\", new OnEqualListener\u003cItem\u003e() {\n  @Override\n  public boolean isEqual(Item currentItem, Item newItem) {\n    return currentItem.getId() == newItem.getId();\n  }\n});\ndisk.removeItem(\"items\", item);\n//This doesn´t need addOnEqualListener\ndisk.changeItem(\"items\", new OnFindListener\u003cItem\u003e() {\n    @Override\n    public boolean isObject(Item item) {\n      return item.getId() == 4;\n    }\n  }, new OnReadListener\u003cItem\u003e() {\n    @Override\n    public Object onRead(Item item) {\n      item.setName(\"item4´s new Name\")\n      return item;\n    }\n});\n```\n\ngradle\n```groovy\ncompile 'io.fabianterhorst:Floppy:0.2.6'\n```\n\nmaven\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.fabianterhorst\u003c/groupId\u003e\n  \u003cartifactId\u003eFloppy\u003c/artifactId\u003e\n  \u003cversion\u003e0.2.0\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianterhorst%2Ffloppy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabianterhorst%2Ffloppy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabianterhorst%2Ffloppy/lists"}