Here you can find the source of byteTOInputStream(byte[] in)
public static InputStream byteTOInputStream(byte[] in) throws Exception
//package com.java2s; import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { public static InputStream byteTOInputStream(byte[] in) throws Exception { ByteArrayInputStream is = new ByteArrayInputStream(in); return is; }/*from w w w . j a va 2 s . c o m*/ }