首页 > 其他 > 详细

2020.8.2第二十七天

时间:2020-08-02 19:44:54      阅读:78      评论:0      收藏:0      [点我收藏+]

1.今天学习内存操作流

 1 import java.io. ByteArrayInputStream;
 2 import java.io.ByteArrayOutputStream;
 3 import java.io. IOException;
 4 import java.io. InputStream;
 5 import java. io. OutputStream;
 6 public class ByteOutputStreamDemo{
 7 public static void main(String[] args) throws IOException {
 8 outin() ;
 9 }
10 public static void outin() throws IOException {
11 String info = "hello Java";
12 InputStream input =new ByteArrayInputStream (info.getBytes()) ;
13 OutputStream output = new ByteArrayOutputStream();
14 int temp = 0;
15 while ((temp - input.read()) != -1)
16 output .write (Character . toUpperCase ((char) temp)) ;
17 String str = output.toString(); 
18 input.close() ;
19 output.close() ;
20 System. out. println(str) ;
21 }
22 }

2.遇到的问题;不知道 内存怎么输入输出;

3.明天继续学习第12章;

 

2020.8.2第二十七天

原文:https://www.cnblogs.com/Nojava/p/13420118.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!