登录

java randomAccessfile 中的舍弃高八位是什么意思?

//使用writeBytes方法把一串字符写到文件中,使用该方法将会被舍弃字符中的高8位,所以实际上写入的是字符中的低8位.  
randomAccessFile.writeBytes("I am here!If you love me,please give the kiss to me!\nThank you for your love!");  
System.out.println("使用readLine方法读取数据:");  

看博客的源码是这么写的,但是不明白为什么要舍弃高八位?
这是网址:http://blog.csdn.net/qsuron/article/details/9389271
第三段代码的第42行
为什么要踩我 我是真的不会啊 TAT

# Java
ringa_leeringa_lee2070 天前623 次浏览

全部回复(2) 我要回复

  • PHPzhong

    PHPzhong2017-04-17 11:43:32

    public final void writeBytes(String s)
                          throws IOException
    

    Writes the string to the file as a sequence of bytes. Each character in the string is written out, in sequence, by discarding its high eight bits. The write starts at the current position of the file pointer.

    这个方法叫什么?。。。。。它叫什么就是为什么。。。

    回复
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 11:43:32

    没有为什么 规定。。。

    回复
    0
  • 取消回复发送