Android InputStream to String Convert convertStreamToString(InputStream is)

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

Description

convert Stream To String

Declaration

static String convertStreamToString(InputStream is) 

Method Source Code

//package com.java2s;

import java.io.InputStream;

import java.util.Scanner;

public class Main {
    static String convertStreamToString(InputStream is) {
        Scanner s = new Scanner(is, "utf-8").useDelimiter("\\A");
        return s.hasNext() ? s.next() : "";
    }// w w w  . j av a2  s .  c  om
}

Related

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