Linked Questions
14 questions linked to/from Download Large file from server using REST template Java Spring MVC
-3 votes
2 answers
442 views
put very big content in a string or stringbuilder [duplicate]
I want to fetch a very big html page, however when I tried to use jsoup for parsing the page it reported a lot of erros because the page is too large. I also saved this page as a text file (resulting ...
35 votes
4 answers
36k views
Spring WebClient: How to stream large byte[] to file?
It seems like it the Spring RestTemplate isn't able to stream a response directly to file without buffering it all in memory. What is the proper to achieve this using the newer Spring 5 WebClient? ...
20 votes
4 answers
35k views
how to download large files without memory issues in java
When I am trying to download a large file which is of 260MB from server, I get this error: java.lang.OutOfMemoryError: Java heap space. I am sure my heap size is less than 252MB. Is there any way I ...
11 votes
3 answers
25k views
Spring MVC : large files for download, OutOfMemoryException
How to provide large files for download through spring controller ? I followed few discussions on similar topic : Downloading a file from spring controllers but those solutions fails for large files ...
5 votes
2 answers
13k views
Download large file through Spring rest template
Server Code : @POST @Path("reportDownload") @Consumes(MediaType.APPLICATION_JSON) public Response generateReport(QueryData queryData) { File file = new File("report.xlsx") // large file ...
1 vote
1 answer
6k views
Spring and returning large volume of Json data
My project is based on Java 8 and uses Spring throughout I have a service that returns a bean which contains a list of beans in it. Here is the code API Method @RequestMapping(value = "/search",", ...
0 votes
1 answer
3k views
Download and read on a large csv file in java Spring Rest service
I have a Spring rest service which runs periodically after every 10 min. Service knows the path to a file stored on remote server. Size of the file is around 2GB. Service fetches the file and then ...
1 vote
2 answers
6k views
Downloading huge files from spring boot REST service
I'm currently writing a REST service with spring boot which should provide a file download, i. e. a client application can download files from the service. A file can be several gigabytes big (...
3 votes
2 answers
4k views
Java spring file download proxy with rest calls
I need to create a rest service in java which will in turn connect to another rest service for file download. For now, I just need to transfer the file from the other backend to client but in future ...
5 votes
0 answers
3k views
How to async stream big file through Spring MVC from external source?
Calling all Spring Framework experts, Scenario User A performs GET request to Spring Controller which makes another GET request to remote host to get a file which content is streamed (buffer ...
3 votes
1 answer
835 views
How to resume download with Spring RestTemplate?
I'm using RestTemplate to download a file from a Nexus Server (about 350 mb). The code provided in this post works well for that purpose: RestTemplate restTemplate // = ...; // Optional Accept ...
1 vote
0 answers
737 views
RestTemplate InputStream from ResponseBody using more memory than expected
I need to download potentially large files from a server. In order to avoid potential OutOfMemoryExceptions, I want to use InputStreams to prevent putting the entire file in memory at once. I ...
0 votes
0 answers
294 views
How to read and process partial response from RestClient.exchange as the response contains huge data
Have a scenario like where I need to process and check the size of response from below code before returning complete response. ResponseEntity response = (ResponseEntity) restTemplate.exchange(...
3 votes
0 answers
235 views
resttemplate does not retrieve the full data of a file from server
My project is using sping boot 2.3.3.RELEASE. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <...