Ÿ http://www.webxml.com.cn 网站上提供了一些WebService服务,我们可以对其进行调用
package cs.utils;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class StreamTools {
public static byte[] read(InputStream inStream) throws IOException{
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
byte [] buffer = new byte[1024];
int len = 0;
while((len=inStream.read(buffer))!=-1){
outStream.write(buffer);
}
inStream.close();
outStream.close();
return outStream.toByteArray();
}
}