{"id":20089935,"url":"https://github.com/bugadani/serialparser","last_synced_at":"2026-05-15T05:03:48.111Z","repository":{"id":77144898,"uuid":"45402261","full_name":"bugadani/SerialParser","owner":"bugadani","description":"A simple library to parse a stream of bytes","archived":false,"fork":false,"pushed_at":"2016-05-13T07:50:30.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T15:28:29.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bugadani.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-02T15:15:01.000Z","updated_at":"2016-03-21T09:38:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"d2c28e90-781d-4ecb-885c-40021a850d17","html_url":"https://github.com/bugadani/SerialParser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bugadani/SerialParser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugadani%2FSerialParser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugadani%2FSerialParser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugadani%2FSerialParser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugadani%2FSerialParser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugadani","download_url":"https://codeload.github.com/bugadani/SerialParser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugadani%2FSerialParser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33054454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"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":[],"created_at":"2024-11-13T16:20:47.734Z","updated_at":"2026-05-15T05:03:48.094Z","avatar_url":"https://github.com/bugadani.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"SerialParser\n========\n\nSerialParser is a small library that can be used to detect specific data frames in a byte array, e.g. while reading a\nstream.\n\nCurrently SerialParser can be used to detect:\n - Fixed length data frames with one or more header bytes and an optional terminating byte\n - Variable length data frames bounded by one or more header bytes and one terminating byte.\n\nNote: detecting variable length frames require an explicitly set buffer size large enough to hold the longest matched frame.\nThis means that the largest variable size frame detected can have the length of the buffer size, including the framing bytes.\n\nExample\n---------\n\nThe following example will call the listener object with \"matched\" as the second argument (converted to a byte array).\n\n    SerialParser.FrameMatchListener listener = new SerialParser.FrameMatchListener() {\n                public void onFrameMatched(SerialParser.FrameDefinition frame, byte[] data) {\n                    //data will be byte[]{'m', 'a', 't', 'c', 'h', 'e', 'd'}\n                }\n            };\n\n    //Create a parser to match a variable length frame\n    SerialParser parser = new SerialParser\n                                 .Builder()\n                                 .setBufferSize(9)  //large enough to match \"+matched;\"\n                                 .addFrameDefinition(\n                                         new SerialParser.FrameDefinition(1, \"+\")\n                                                 .setTerminatingByte((byte) ';')\n                                                 .addListener(listener)\n                                 )\n                                 .build();\n    parser.add(\"not matched text +matched;\".getBytes());\n\nInstallation\n------------\nSerialParser is available as a Maven repository through jitpack.io\n\n### As a Gradle dependency\n\n    repositories {\n        maven { url \"https://jitpack.io\" }\n    }\n\n    dependencies {\n        compile 'com.github.bugadani:SerialParser:7500c51'\n    }\n\n### Maven\n\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.bugadani\u003c/groupId\u003e\n        \u003cartifactId\u003eSerialParser\u003c/artifactId\u003e\n        \u003cversion\u003e7500c51\u003c/version\u003e\n    \u003c/dependency\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugadani%2Fserialparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugadani%2Fserialparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugadani%2Fserialparser/lists"}