Android String to InputStream Convert StringTOInputStream(String str)

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

Description

String to InputStream

Parameter

Parameter Description
str a parameter

Exception

Parameter Description
Exception an exception

Declaration

public static InputStream StringTOInputStream(String str)
        throws Exception 

Method Source Code

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

import java.io.InputStream;

public class Main {
    /**/*from w w w .  java2  s .co  m*/
     * String to InputStream
     * 
     * @param str
     * @return
     * @throws Exception
     */
    public static InputStream StringTOInputStream(String str)
            throws Exception {

        ByteArrayInputStream is = new ByteArrayInputStream(
                str.getBytes("ISO-8859-1"));
        return is;
    }
}

Related

  1. getInputStream(String str)
  2. StringTOInputStream(String in)
  3. StringTOInputStream(String in)
  4. StringTOInputStream(String in)
  5. StringTOInputStream(String in, String encoding)
  6. convertToInputStream(String string)