Recently, i have created a simple Java Servlet server which could parse a request xml from the HTTP POST Request and then return the HTTP Response together with the response xml. In the server implementation, i need to convert an InputStream into a String. The following code shows you how to make it.
In this example, the program will read the data.txt file and print the content to the console. Continue reading Java – Convert InputStream to String