php 图片流是二进制字符串吗

如题所述

File file=new File("d:\\test.jpg");  
InputStream input =new FileInputStream(file);   
byte[] temp = new byte[input.available()];         
tem.read(temp);  
tem.close();  
String outstr = new String(temp);  
byte[] outbyte = outstr.getBytes();  
File outfile=new File("d:\\testout.jpg");  
FileOutputStream fos = new FileOutputStream(outfile);  
fos.write(outbyte);  
fos.close();
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答