Here you can find the source of isByteArrayInputStream(InputStream is)
private static boolean isByteArrayInputStream(InputStream is)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { private static boolean isByteArrayInputStream(InputStream is) { return ByteArrayInputStream.class.equals(is.getClass()); }/*from ww w . j a va 2 s . co m*/ }