Java的DataInputStream的readUTF方法是怎么读取字符串的???
生活随笔
收集整理的這篇文章主要介紹了
Java的DataInputStream的readUTF方法是怎么读取字符串的???
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
DataInputStream
看源碼,調用的第一句就獲取了長度int utflen = in.readUnsignedShort();這個方法的Doc :
Reads two input bytes and returns an int value in the range 0 through
readUTF的Doc:
Let a be the first byte read and b be the second byte. The value returned is:
IOException - if an I/O error occurs.
看源碼,調用的第一句就獲取了長度int utflen = in.readUnsignedShort();這個方法的Doc :
Reads two input bytes and returns an int value in the range 0 through
readUTF的Doc:
Let a be the first byte read and b be the second byte. The value returned is:
IOException - if an I/O error occurs.
總結
以上是生活随笔為你收集整理的Java的DataInputStream的readUTF方法是怎么读取字符串的???的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苹果13发布会视频,苹果13系列手机:亮
- 下一篇: 多彩蛋糕卷的做法?