如何从部分字节数组创建ByteArrayInputStream
/* from 时 代 J a v a 公 众 号 - N o w J a v a . c o m*/ import java.io.ByteArrayInputStream; public class Main { public static void main(String[] args) { String str = "Byte Array InputStream test"; byte[] bytes = str.getBytes(); ByteArrayInputStream bis = new ByteArrayInputStream(bytes, 5, 5); int ch; while ((ch = bis.read()) != -1) {