{"id":15383907,"url":"https://github.com/heruan/jaxrs-range-filter","last_synced_at":"2025-06-15T08:07:01.123Z","repository":{"id":57743292,"uuid":"45480631","full_name":"heruan/jaxrs-range-filter","owner":"heruan","description":"HTTP Ranged Requests for JAX-RS.","archived":false,"fork":false,"pushed_at":"2019-03-28T15:15:52.000Z","size":22,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T19:45:41.668Z","etag":null,"topics":["java","jax-rs","serve-byte-ranges"],"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/heruan.png","metadata":{"files":{"readme":"README.adoc","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-11-03T16:45:37.000Z","updated_at":"2023-10-29T05:57:04.000Z","dependencies_parsed_at":"2022-08-26T01:32:57.770Z","dependency_job_id":null,"html_url":"https://github.com/heruan/jaxrs-range-filter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/heruan/jaxrs-range-filter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heruan%2Fjaxrs-range-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heruan%2Fjaxrs-range-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heruan%2Fjaxrs-range-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heruan%2Fjaxrs-range-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heruan","download_url":"https://codeload.github.com/heruan/jaxrs-range-filter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heruan%2Fjaxrs-range-filter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259942785,"owners_count":22935328,"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":["java","jax-rs","serve-byte-ranges"],"created_at":"2024-10-01T14:39:56.337Z","updated_at":"2025-06-15T08:07:01.102Z","avatar_url":"https://github.com/heruan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= HTTP Ranged Requests for JAX-RS\n\nimage:https://img.shields.io/github/release/heruan/jaxrs-range-filter.svg[link=https://github.com/heruan/jaxrs-range-filter/releases,title=Latest release]\nimage:https://img.shields.io/maven-central/v/to.lova.jaxrs/jaxrs-range-filter.svg[title=jaxrs-range-filter]\nimage:https://img.shields.io/github/downloads/heruan/jaxrs-range-filter/total.svg[link=https://github.com/heruan/jaxrs-range-filter/archive/master.zip,title=GitHub]\nimage:https://img.shields.io/circleci/project/github/heruan/jaxrs-range-filter.svg[link=https://circleci.com/gh/heruan/jaxrs-range-filter,title=CricleCI]\nimage:https://img.shields.io/codecov/c/github/heruan/jaxrs-range-filter.svg[link=https://codecov.io/gh/heruan/jaxrs-range-filter,title=Codecov]\nimage:https://img.shields.io/github/license/heruan/jaxrs-range-filter.svg[link=http://www.apache.org/licenses/LICENSE-2.0.html,title=Apache License 2.0]\n\n## Example usage\n\n[source,xml]\n----\n\u003cdependency\u003e\n  \u003cgroupId\u003eto.lova.jaxrs\u003c/groupId\u003e\n  \u003cartifactId\u003ejaxrs-range-filter\u003c/artifactId\u003e\n  \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n----\n\n[source,java]\n----\nimport java.util.Collections;\nimport java.util.Set;\n\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.core.Application;\n\n@ApplicationPath(\"app\")\npublic class MyApplication extends Application {\n\n    @Override\n    public Set\u003cClass\u003c?\u003e\u003e getClasses() {\n        return Collections.singleton(RangeResponseFilter.class);\n    }\n\n}\n----\n\n[source,java]\n----\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"alphabet\")\npublic class AlphabetResource {\n\n    @GET\n    @Produces(MediaType.TEXT_PLAIN)\n    public String alphabet() {\n        return \"abcdefghijklmnopqrstuvwxyz\";\n    }\n\n}\n----\n\nThen JAX-RS will serve byte ranges whenever a HTTP `Range` header is present on\nthe request, e.g.\n\n[source]\n----\n$ curl -i http://localhost:8080/app/alphabet\nHTTP/1.1 200 OK\nContent-Type: text/plain\nContent-Length: 26\n\nabcdefghijklmnopqrstuvwxyz\n----\n\n[source]\n----\n$ curl -i http://localhost:8080/app/alphabet -H \"Range: bytes=6-10\"\nHTTP/1.1 206 Partial Content\nAccept-Ranges: bytes\nContent-Range: bytes 6-10/26\nContent-Type: text/plain\nContent-Length: 5\n\nghijk\n----\n\n[source]\n----\n$ curl -i http://localhost:8080/app/alphabet -H \"Range: bytes=6-10,18-\"\nHTTP/1.1 206 Partial Content\nAccept-Ranges: bytes\nContent-Type: multipart/byteranges; boundary=VXTwimfDqIB3LRZ2jjQ8vxbSvnGAB2sMn3UVq\nContent-Length: 257\n\n--VXTwimfDqIB3LRZ2jjQ8vxbSvnGAB2sMn3UVq\nContent-Type: text/plain\nContent-Range: bytes 6-10/26\n\nghijk\n--VXTwimfDqIB3LRZ2jjQ8vxbSvnGAB2sMn3UVq\nContent-Type: text/plain\nContent-Range: bytes 18-26/26\n\nstuvwxyz\n--VXTwimfDqIB3LRZ2jjQ8vxbSvnGAB2sMn3UVq--\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheruan%2Fjaxrs-range-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheruan%2Fjaxrs-range-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheruan%2Fjaxrs-range-filter/lists"}