Java Integer Array to String inputStreamToStr(InputStream is)

Here you can find the source of inputStreamToStr(InputStream is)

Description

input Stream To Str

License

Open Source License

Declaration

public static String inputStreamToStr(InputStream is) 

Method Source Code


//package com.java2s;
import java.io.BufferedReader;

import java.io.InputStream;
import java.io.InputStreamReader;

public class Main {
    public static String inputStreamToStr(InputStream is) {
        try {//from  ww  w.  j  a  va  2  s  .com
            BufferedReader reader = new BufferedReader(new InputStreamReader(is));
            StringBuffer strBuf = new StringBuffer();
            String str = reader.readLine();
            while (str != null) {
                strBuf.append(str);
                str = reader.readLine();
            }

            return strBuf.toString().trim();
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }
}

Related

  1. arrayIntsToString(int... lst)
  2. arrayIntToString(int[] arrayInt)
  3. convertIntArrayToString(int[] data)
  4. convertIntArrayToString(int[] data)
  5. convertIntArrayToString(int[] value, String separator)
  6. inputStreamToStr(InputStream is)
  7. intArray2string(int intarr[])
  8. intArray2String(int[] value)
  9. intArray2String(int[] xs)