/***实现将文件读取到一个byte数组*/publicstaticbyte[]read2(Stringfilename){try{InputStreamin=newFileInputStream(filename);byte[]buf=newbyte[in.available()];in.read(buf);in.close();returnbuf;}catch(IOExceptione){thrownewRuntimeException(e);}}