📄 bytearrayinputstreamdemo.java
字号:
//ByteArrayInputStream是把字节数组当作源的输入流
import java.io.*;
class ByteArrayInputStreamDemo
{
public static void main(String[] args) throws Exception
{
String tmp = "abcdefghijklmnopqrstuvwxyz";
byte b[] = tmp.getBytes();
ByteArrayInputStream input1 = new ByteArrayInputStream(b);
ByteArrayInputStream input2 = new ByteArrayInputStream(b,0,3);
//System.out.println(input1);
//System.out.print(input2);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -