Get InputStream from a StringTag(s): String/Number
public static final String ENCODING = "UTF8"; // see note
public static InputStream fromString(String str) {
byte[] bytes = str.getBytes(ENCODING);
return new ByteArrayInputStream(bytes);
}
Note : List of supported encodings here
mail_outline
Send comment, question or suggestion to howto@rgagnon.com
Send comment, question or suggestion to howto@rgagnon.com