2013年6月27日
摘要: 来源:http://www.cnblogs.com/notus/archive/2006/08/10/473000.html#2662503(是不是实际上可以用这个办法调用任何xml web services呢?高人答一下)最近在做一个web services,由我来写文档。为了方便广大asp用户也可以使用我们的服务,特意在网上搜了半天,发现大致有下面两个办法来通过asp调用.net xml web services。1.使用soap toolkit 3.02.使用xmlhttp我来写个总结,这样以后大家如果遇到这样的问题,如果用搜索搜到我的页面上,那立刻就可以实现自己的方案了。1.使用soa 阅读全文
posted @ 2013-06-27 10:42 猿人谷 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1 public class FileAccess 2 { 3 4 public static boolean Move(File srcFile, String destPath) 5 { 6 // Destination directory 7 File dir = new File(destPath); 8 9 // Move file to new directory10 boolean success = srcFile.renameTo(new File(dir, srcFile.getName(... 阅读全文
posted @ 2013-06-27 10:35 猿人谷 阅读(1034) 评论(0) 推荐(0) 编辑
摘要: 1、按字节读取文件内容2、按字符读取文件内容3、按行读取文件内容4、随机读取文件内容 publicclassReadFromFile{/***以字节为单位读取文件,常用于读二进制文件,如图片、声音、影像等文件。*/publicstaticvoidreadFileByBytes(StringfileName){Filefile=newFile(fileName);InputStreamin=null;try{System.out.println("以字节为单位读取文件内容,一次读一个字节:");//一次读一个字节in=newFileInputStream(file);intt 阅读全文
posted @ 2013-06-27 10:09 猿人谷 阅读(660) 评论(0) 推荐(0) 编辑
摘要: java读取txt文件内容。可以作如下理解:首先获得一个文件句柄。File file = new File(); file即为文件句柄。两人之间连通电话网络了。接下来可以开始打电话了。通过这条线路读取甲方的信息:new FileInputStream(file) 目前这个信息已经读进来内存当中了。接下来需要解读成乙方可以理解的东西既然你使用了FileInputStream()。那么对应的需要使用InputStreamReader()这个方法进行解读刚才装进来内存当中的数据解读完成后要输出呀。那当然要转换成IO可以识别的数据呀。那就需要调用字节码读取的方法BufferedReader()。同时使 阅读全文
posted @ 2013-06-27 10:07 猿人谷 阅读(988) 评论(0) 推荐(1) 编辑
摘要: http://topic.csdn.net/t/20050325/08/3879427.html题目:Integer i = new Integer(42) Long l = new Long(42) Double d = new Double(42.0) 下面哪些返回true 1: i==l 2: i==d 3: l==d 4:i.equals(l) 5:i.equals(d) 6:l.equals(d) 7:i.equals(42) 答案:7; 编码验证: public class Equivalence { public static void main(St... 阅读全文
posted @ 2013-06-27 09:13 猿人谷 阅读(430) 评论(0) 推荐(0) 编辑
摘要: java 使用相对路径读取文件1.java project环境,使用java.io用相对路径读取文件的例子:*目录结构: DecisionTree |___src |___com.decisiontree.SamplesReader.java |___resource |___train.txt,test.txt*SamplesReader.java: String filepath="resource/train.txt";//注意filepath的内容; File file=new File(filepath); ……*我们留意filepath的内容,java.io默认 阅读全文
posted @ 2013-06-27 09:04 猿人谷 阅读(1892) 评论(0) 推荐(0) 编辑