List of utility methods to do String to InputStream Convert
InputStream | String2InputStream(String str) String Input Stream ByteArrayInputStream stream = null; try { stream = new ByteArrayInputStream(str.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return stream; |
InputStream | StringToInputStream(String str) String To Input Stream if (TextUtils.isEmpty(str)) return null; ByteArrayInputStream stream = new ByteArrayInputStream( str.getBytes()); return stream; |
InputStream | getInputStream(String str) get Input Stream InputStream inputStream = new ByteArrayInputStream(str.getBytes()); return inputStream; |
InputStream | StringTOInputStream(String in) String TO Input Stream ByteArrayInputStream is = new ByteArrayInputStream(in.getBytes()); return is; |
InputStream | StringTOInputStream(String in) String TO Input Stream ByteArrayInputStream is = new ByteArrayInputStream( in.getBytes("ISO-8859-1")); return is; |
InputStream | StringTOInputStream(String in) String TO Input Stream ByteArrayInputStream is = new ByteArrayInputStream( in.getBytes("ISO-8859-1")); return is; |
InputStream | StringTOInputStream(String in, String encoding) String TO Input Stream try { ByteArrayInputStream is = new ByteArrayInputStream( in.getBytes("ISO-8859-1")); return is; } catch (UnsupportedEncodingException e) { return null; |
InputStream | StringTOInputStream(String str) String to InputStream ByteArrayInputStream is = new ByteArrayInputStream( str.getBytes("ISO-8859-1")); return is; |
InputStream | convertToInputStream(String string) convert To Input Stream byte[] bytes = string.getBytes(); return new ByteArrayInputStream(bytes); |