I'm new to java and made a small app that fetches a stream of strings from a url. The stream of strings is a bunch of JSON objects seperated by a newline. I check if there is new data every second and parse it and do something based on it. The issue is for some reason it only logs the first json string and then a bunch of empty newlines.
When using curl I get data that looks like this: https://pastebin.com/mUPa3LLh
When using my app I get data that looks like this: https://pastebin.com/jywdkDen
and the newlines continue printing every second until the program is killed.
Here is the code itself: https://pastebin.com/3NhRZAjG
I am not sure why it stops, it can fetch data from the URL since it prints the first one but nothing after that.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.