Skip to content

Tag: jersey

Jersey Client download ZIP file and unpack efficiently

So, I have a server application that returns ZIP files and I’m working with huge files (>=5GB). I am then using the jersey client to do a GET request from this application after which I want to basically extract the ZIP and save it as a folder. This is the client configuration: And here’s the c…

Get file resource in a Jersey 3

I am running a web application using Jersey. In my controller, I am trying to get a file in src/main/resources folder. My folder structure is: My gradle dependencies are: My code is: How do I get an InputStream for this file? Answer You can get it by servletContext.getResourceAsStream Add ServletContext using…

Get object from .readEntity

I have a java service which calls an API and gets the following in return How can i use .readEntity (or something else) to get the object for a given field; say service2 Or just convert all objects inside status to a List<> of objects String output = response.readEntity(String.class); works, but i dont …