Java InputStream Create getInputStream(String text)

Here you can find the source of getInputStream(String text)

Description

get Input Stream

License

Open Source License

Declaration

public static InputStream getInputStream(String text) throws UnsupportedEncodingException 

Method Source Code


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

public class Main {
    public static InputStream getInputStream(String text) throws UnsupportedEncodingException {
        InputStream inputStream = new ByteArrayInputStream(text.getBytes("utf-8"));
        return inputStream;
    }/*from  www  . j a  v  a 2 s. c o m*/
}

Related

  1. getInputStream(String path)
  2. getInputStream(String path)
  3. getInputStream(String path)
  4. getInputStream(String sPath)
  5. getInputStream(String str)
  6. getInputStream(String thePath)
  7. getInputStream(String url)
  8. getInputStream(String xmlStr)
  9. getInputStream(String... subpaths)