List of utility methods to do InputStream Create
InputStream | toInputStream(String input) Convert the specified string to an input stream, encoded as bytes using the default character encoding of the platform. byte[] bytes = input.getBytes(); return new ByteArrayInputStream(bytes); |
InputStream | toInputStream(String input, String encoding) to Input Stream byte bytes[] = encoding == null ? input.getBytes() : input.getBytes(encoding); return new ByteArrayInputStream(bytes); |
InputStream | toInputStream(String result, String encoding) Returns an input stream serving the given argument try { return new ByteArrayInputStream(result.getBytes(encoding)); } catch (UnsupportedEncodingException ex) { throw new RuntimeException("Unsupported encoding", ex); |
InputStream | toInputStream(String s, String charSet) to Input Stream return new ByteArrayInputStream(s.getBytes(charSet)); |
InputStream | toInputStream(String source) to Input Stream byte[] data = fromIdentityEncodedString(source); return new ByteArrayInputStream(data); |
InputStream | toInputStream(String text) to Input Stream return new ByteArrayInputStream(text.getBytes()); |
InputStream | toInputStream(String value) to Input Stream if (value == null) { return null; return new ByteArrayInputStream(value.getBytes("UTF-8")); |
InputStream | toInputStream(String[] stringArray) to Input Stream return toInputStream(stringArray, 0);
|
InputStream | toInputStreamFromBase64(String inBase64String) to Input Stream From Base if (inBase64String == null) { return null; return new ByteArrayInputStream(toBytesFromBase64(inBase64String)); |