Android String to InputStream Convert StringTOInputStream(String in, String encoding)

Here you can find the source of StringTOInputStream(String in, String encoding)

Description

String TO Input Stream

Declaration

public static InputStream StringTOInputStream(String in, String encoding) 

Method Source Code

//package com.java2s;

import java.io.ByteArrayInputStream;

import java.io.InputStream;

import java.io.UnsupportedEncodingException;

public class Main {

    public static InputStream StringTOInputStream(String in, String encoding) {
        try {/* w w w . j  ava2 s. c  o  m*/
            ByteArrayInputStream is = new ByteArrayInputStream(
                    in.getBytes("ISO-8859-1"));
            return is;
        } catch (UnsupportedEncodingException e) {
            return null;
        }
    }
}

Related

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