import java.io.*;
public class Snipperts {
public static void main(String[] args) throws IOException {
String name="hello";
InputStream inputStream=new ByteArrayInputStream(name.getBytes());
OutputStream outputStream=new ByteArrayOutputStream();
int data=0;
byte dete[]=new byte[10];
while((data=inputStream.read())!=-1){
outputStream.write( Character.toUpperCase((char)data));
outputStream.close();
inputStream.close();
}
System.out.println(outputStream.toString());
}
}
Java IO ByteArrayOutputStream和ByteArrayInputStream
猜你喜欢
转载自blog.csdn.net/lyl140935/article/details/108587386
今日推荐
周排行