How to read file from HTTP server or how to download file from HTTP server using spring batch.
Asked
Active
Viewed 1,373 times
0
-
Possible duplicate of [org.springframework.batch.item.ItemStreamException: Failed to initialize the reader](http://stackoverflow.com/questions/34789681/org-springframework-batch-item-itemstreamexception-failed-to-initialize-the-rea) – Luca Basso Ricci Jan 15 '16 at 11:42
-
use spring integration – Luca Basso Ricci Jan 15 '16 at 12:29
1 Answers
-1
This is not a specified Spring Batch problem, just use an pre-step to download your file local (for example via wget
and System-call) or use an implementation of ItemStreamReader
which does some http-reading like described here: https://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html

MWiesner
- 8,868
- 11
- 36
- 70
-
am getting below error.. Exception in thread "main" java.net.UnknownHostException: www.google.com at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) – manohar reddy Jan 18 '16 at 06:10