Android String to InputStream Convert StringToInputStream(String str)

Here you can find the source of StringToInputStream(String str)

Description

String To Input Stream

Declaration

public static InputStream StringToInputStream(String str) 

Method Source Code

//package com.java2s;

import java.io.ByteArrayInputStream;
import java.io.InputStream;

import android.text.TextUtils;

public class Main {

    public static InputStream StringToInputStream(String str) {
        if (TextUtils.isEmpty(str))
            return null;
        ByteArrayInputStream stream = new ByteArrayInputStream(
                str.getBytes());/*from w  ww .  j  a v  a 2s  .c om*/
        return stream;
    }
}

Related

  1. String2InputStream(String str)
  2. getInputStream(String str)
  3. StringTOInputStream(String in)
  4. StringTOInputStream(String in)
  5. StringTOInputStream(String in)