最新回答 / 慕用1004589
在第二个dis.readUTF();上,将鼠标移到这上面,有三个修复方法,选第一个Remove argument to match 'readUTF()'就可以了
2016-10-14
已采纳回答 / 张博
c表示当前读取到的字节 。1、c = isr.read() Reads a single character 读取单个characterthe next byte of data, or -1 if the end of the file is reached返回下一个next byte of data2、c = isr.read(byte[] , start,len) Reads characters into a portion of an array 读取多个charachters 返回t...
2016-10-14
最后打印16进制那一块,不可以写成Integer.toHexString(Arrays.toString(buf)). Integer.toHexString( )括号里面必须写int类型 而Arrays.toString(buf)) 这是一个String 类型 可以这样写 Integer.toHexString(i);
2016-10-13
最赞回答 / 慕运维6388425
java中int是占32位的,这个在基本数据类型知识点应该有提到,所以一个10转化为二进制应该是1010,在内存中,应该是00000000 00000000 00000000 00001010,是这样显示的,占据了4个字节,32个位,一个字节8位。越左边就越低,越右边就越高,所以最左边是高8位即00000000,最右边是低8位即00001010。至于为什么写4次,是因为write只能一次写8位,所以要通过对数据4次的右移位运算来让这个数据的每一个字节都可以被写入。至于位运算,可以去另外查下关于这方面的资料...
2016-10-12