Here you can find the source of getInputStream(String str)
Parameter | Description |
---|---|
str | a parameter |
public static InputStream getInputStream(String str)
//package com.java2s; /******************************************************************************* * Copyright Duke Comprehensive Cancer Center and SemanticBits * // w w w . j av a2s. c o m * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/c3pr/LICENSE.txt for details. ******************************************************************************/ import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { /** * Returns an InputStream given a String str * * @param str * @return */ public static InputStream getInputStream(String str) { byte[] b = str.getBytes(); ByteArrayInputStream iStream = new ByteArrayInputStream(b); return iStream; } }