Search code examples
javajsonstreamingfeed

Http Streams with Java


I'm looking for the best way to stream live data over the http protocol with java.

I'm currently using HttpURLConnection to receive json feeds, I would like to know if it can be used to stream feeds too.


Solution

  • If you are looking for the "best" way to stream HTTP and JSON, I would suggest going with Apache HttpComponents and Jackson JSON library.

    However, if you are just looking for streaming of a HttpURLConnection, the getInputStream method should provide for that.