Java InputStream Create toInputStream(String s, String charSet)

Here you can find the source of toInputStream(String s, String charSet)

Description

to Input Stream

License

Open Source License

Declaration

public static InputStream toInputStream(String s, String charSet) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

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

public class Main {
    public static InputStream toInputStream(String s, String charSet) throws IOException {
        return new ByteArrayInputStream(s.getBytes(charSet));
    }/* ww  w.j  a va  2s.com*/
}

Related

  1. toInputStream(OutputStream out)
  2. toInputStream(String input)
  3. toInputStream(String input)
  4. toInputStream(String input, String encoding)
  5. toInputStream(String result, String encoding)
  6. toInputStream(String source)
  7. toInputStream(String text)
  8. toInputStream(String value)
  9. toInputStream(String[] stringArray)