{"id":30196397,"url":"https://github.com/megaprog/stream-util","last_synced_at":"2025-08-13T05:18:49.960Z","repository":{"id":54518749,"uuid":"44427094","full_name":"Megaprog/stream-util","owner":"Megaprog","description":"The helper class for working with Java 8 streams","archived":false,"fork":false,"pushed_at":"2021-02-13T15:57:50.000Z","size":59,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T19:45:07.144Z","etag":null,"topics":["collections","java","java8","streams-api"],"latest_commit_sha":null,"homepage":null,"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/Megaprog.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":"2015-10-17T06:54:17.000Z","updated_at":"2022-11-05T05:17:11.000Z","dependencies_parsed_at":"2022-08-13T18:30:43.548Z","dependency_job_id":null,"html_url":"https://github.com/Megaprog/stream-util","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/Megaprog/stream-util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megaprog%2Fstream-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megaprog%2Fstream-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megaprog%2Fstream-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megaprog%2Fstream-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Megaprog","download_url":"https://codeload.github.com/Megaprog/stream-util/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Megaprog%2Fstream-util/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270183606,"owners_count":24541341,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["collections","java","java8","streams-api"],"created_at":"2025-08-13T05:18:47.933Z","updated_at":"2025-08-13T05:18:49.926Z","avatar_url":"https://github.com/Megaprog.png","language":"Java","readme":"[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.jmmo/stream-util/badge.png)](https://maven-badges.herokuapp.com/maven-central/org.jmmo/stream-util)\n\n# Stream Utility\n\nThe helper class for working with Java 8 streams. It allows to create streams from Optional, from Supplier, from Matcher etc. \n\n## How to use it?\n\nTo create stream from supplier function:\n\n```java\nStream\u003cObject\u003e stream = StreamUtil.supply(() -\u003e hasData() ? read() : null);\n```\n  \nTo create files stream (all files in directory and subdirectories):\n\n```java\nStream\u003cPath\u003e files = StreamUtil.files(\"myDirectory\");\n```\n\nTo wrap lambdas throws checked exceptions:\n \n```java\nvoid method(int a, String b) throws IOException, InterruptedException { }\n\nboolean isSomething(int a, String b) throws IOException, TimeoutException { return true; }\n\npublic void testUnchecked_Throw() throws Exception {\n    Stream.of(1)\n        .filter(i1 -\u003e StreamUtil.unchecked(() -\u003e isSomething(i1, \"1\")))\n        .forEach(i2 -\u003e StreamUtil.unchecked(() -\u003e method(i2, \"2\")));\n}\n```\n\nTo wrap lambdas throws InterruptedException:\n \n```java\nStreamUtil.uninterrupted(() -\u003e Thread.sleep(1));\n```\n\nTo logging expensive expressions:\n \n```java\nlog.debug(\"Debugging of {}\", LazyToString.of(() -\u003e \"some expensive expression\"));\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegaprog%2Fstream-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegaprog%2Fstream-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegaprog%2Fstream-util/lists"}