Android InputStream to String Convert convertStreamToString(java.io.InputStream is)

Here you can find the source of convertStreamToString(java.io.InputStream is)

Description

convert Stream To String

Declaration

public static String convertStreamToString(java.io.InputStream is) 

Method Source Code

//package com.java2s;

public class Main {
    public static String convertStreamToString(java.io.InputStream is) {
        java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }/*from   ww w  .j  a  v  a2 s .c  o m*/
}

Related

  1. convertStreamToString(InputStream is)
  2. convertStreamToString(InputStream is)
  3. convertStreamToString(InputStream is)
  4. convertStreamToString(InputStream is)
  5. convertStreamToString(java.io.InputStream is)
  6. streamToString(InputStream is)
  7. stringFromInputStream(InputStream is)
  8. getStringFromInputStream(InputStream is)