Linked Questions

-3 votes
2 answers
442 views

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 ...
Davi Resio's user avatar
35 votes
4 answers
36k views

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? ...
Dave L.'s user avatar
  • 9,840
20 votes
4 answers
35k views

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 ...
Hima Bindu's user avatar
11 votes
3 answers
25k views

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 ...
Martin V.'s user avatar
  • 3,750
5 votes
2 answers
13k views

Server Code : @POST @Path("reportDownload") @Consumes(MediaType.APPLICATION_JSON) public Response generateReport(QueryData queryData) { File file = new File("report.xlsx") // large file ...
vels4j's user avatar
  • 11.3k
1 vote
1 answer
6k views

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",", ...
Damien's user avatar
  • 4,129
0 votes
1 answer
3k views

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 ...
d123's user avatar
  • 437
1 vote
2 answers
6k views

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 (...
Falco Preiseni's user avatar
3 votes
2 answers
4k views

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 ...
Popeye's user avatar
  • 1,558
5 votes
0 answers
3k views

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 ...
user avatar
3 votes
1 answer
835 views

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 ...
lucidMonkey's user avatar
1 vote
0 answers
737 views

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 ...
idungotnosn's user avatar
  • 2,051
0 votes
0 answers
294 views

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(...
Delli Kilari's user avatar
  • 1,016
3 votes
0 answers
235 views

My project is using sping boot 2.3.3.RELEASE. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <...
Nick Dong's user avatar
  • 3,796