Convering String to inputStream java

Convering String to inputStream java

There are a number of places where string would be needed to be changed to InputStream object. For example the Dom parser would expect an InputStream for the creation of its DocumentBuilder

Here is the simple yet powerful single line doing the task!!

inputStream = new ByteArrayInputStream(string.getBytes("UTF-8"));

See how you would solve these known algorithm problems

Implementing tokenizer and adding tokens to the linked list

Array reversal in Recurrsion

testing k complementary pairs algorithm with junit

Java solution for checking anagram strings – tell if phrases are anagrams

Flatten nested javascript array

find longest word in the sentence

Kadane’s algorithm in C – Dynamic Programming

Find the first occurence of number in the sorted array

String Ordered Permutation Algorithm Problem

Changing decimal number to its binary equivalent

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*