List of utility methods to do BufferedInputStream Create
InputStream | getInputStreamFromEncodedStr(String encodedDetails) get Input Stream From Encoded Str BASE64Decoder decoder = new BASE64Decoder(); byte b[] = decoder.decodeBuffer(encodedDetails); return new ByteArrayInputStream(b); |
InputStream | getInputStreamFromString(String _string) Get an input stream from a source String. return (new ByteArrayInputStream(_string.getBytes("UTF-8"))); |
InputStream | getInputStreamFromString(String _string) Get an InputStream from a String instance. try { return (new ByteArrayInputStream(_string.getBytes("UTF-8"))); } catch (java.io.UnsupportedEncodingException e) { return null; |
InputStream | getInputStreamFromString(String input) Retrieves an input stream whose contents will be the value of a String. return new ByteArrayInputStream(input.getBytes()); |
InputStream | getInputStreamFromString(String s) get Input Stream From String return new ByteArrayInputStream(s.getBytes()); |
InputStream | getStream(byte[] bytes) get Stream return new ByteArrayInputStream(bytes); |
InputStream | getStream(final File file) get Stream if (file == null) { throw new IllegalArgumentException("file can't be null"); if (file.exists() == false) { throw new IllegalArgumentException("file dosen't exist : " + file.getAbsolutePath()); try { return new BufferedInputStream(new FileInputStream(file)); ... |
InputStream | getStream(final String string, final String codePage) Get inputstream from string return new ByteArrayInputStream(string.getBytes(codePage)); |
ZipInputStream | getStream(InputStream is) get Stream return (is instanceof ZipInputStream ? (ZipInputStream) is : is instanceof BufferedInputStream ? new ZipInputStream(is) : new ZipInputStream(new BufferedInputStream(is))); |
BufferedInputStream | getStream(String name) get Stream InputStream in = Main.class.getResourceAsStream(name); if (in == null) return null; return new BufferedInputStream(in); |