锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品91久久久久,av在线播放av,国产suv精品一区二区四区视频http://www.aygfsteel.com/javainthinking/category/2331.html鐔婄偧鐨勪釜鎬х┖闂村拰java瀛︿範涔嬫梾zh-cnTue, 27 Feb 2007 12:23:57 GMTTue, 27 Feb 2007 12:23:57 GMT60File鐨勪竴浜涚浉鍏蟲搷浣?/title><link>http://www.aygfsteel.com/javainthinking/archive/2005/07/27/8519.html</link><dc:creator>鐔婄偧鐨勪釜鎬х┖闂村拰java瀛︿範涔嬫梾</dc:creator><author>鐔婄偧鐨勪釜鎬х┖闂村拰java瀛︿範涔嬫梾</author><pubDate>Wed, 27 Jul 2005 01:07:00 GMT</pubDate><guid>http://www.aygfsteel.com/javainthinking/archive/2005/07/27/8519.html</guid><wfw:comment>http://www.aygfsteel.com/javainthinking/comments/8519.html</wfw:comment><comments>http://www.aygfsteel.com/javainthinking/archive/2005/07/27/8519.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javainthinking/comments/commentRss/8519.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javainthinking/services/trackbacks/8519.html</trackback:ping><description><![CDATA[<P>package com.xionglian.common;</P> <P>import java.io.File;<BR>import java.net.URL;<BR>import java.io.InputStream;<BR>import java.io.IOException;<BR>import java.io.BufferedWriter;<BR>import java.io.FileWriter;</P> <P>/**<BR> * <p>Title: </p><BR> * <p>Description: </p><BR> * <p>Copyright: Copyright (c) 2000</p><BR> * <p>Company: </p><BR> * @author 鐔婄偧<BR> * @version 1.0<BR> */</P> <P>public class FileHandle<BR>{</P> <P>  public FileHandle()<BR>  {<BR>  }</P> <P>  /**<BR>   * filename path鍜孶RL涔嬮棿鐨勮漿鎹?BR>   */<BR>  public void _File_URL()<BR>  {<BR>    String path = File.separator + "a";<BR>    System.out.println(path);<BR>    //coverting Between a filename and a URL<BR>    //create a file object<BR>    File file = new File("filename");</P> <P>    //covert a file object to a URL<BR>    URL url = null;<BR>    try<BR>    {<BR>      url=file.toURL();<BR>      System.out.println(url);<BR>    }<BR>    catch(Exception  e)<BR>    {<BR>      e.printStackTrace();<BR>    }</P> <P>    //convert a URL to a file object<BR>    file=new File(url.getFile());</P> <P>    //read the file using the URL<BR>    try<BR>    {<BR>      InputStream is=url.openStream();<BR>      //read from the InputStream<BR>    }<BR>    catch(IOException e)<BR>    {<BR>      e.printStackTrace();<BR>    }<BR>  }</P> <P>  /**<BR>   * 浠巖elative path鍒癮bsolute path涔嬮棿鐨勮漿鎹?BR>   */<BR>  public void rel_to_abspath()<BR>  {<BR>    File file=new File("filename.txt");//filename.txt doesn't need exist<BR>    file=file.getAbsoluteFile();//C:\Documents and Settings\xl\妗岄潰\First\filename</P> <P>    file=new File("test"+File.separator+"filename.txt");<BR>    file=file.getAbsoluteFile();//C:\Documents and Settings\xl\妗岄潰\First\test\filename.txt<BR>  }</P> <P>  /**<BR>   * 鍒ゆ柇涓や釜filename path鏄惁鎸囧悜鍚屼竴file<BR>   * @return boolean<BR>   */<BR>  public boolean isSameFile()<BR>  {<BR>    File file1=new File("filename");<BR>    File file2=new File("/filename");<BR>    //file1.equals(file2)=false;<BR>    try<BR>    {<BR>      //鍒╃敤File.getCanonicalFile()娑堥櫎澶氫綑鐨剆ymbol links鎴栬?."鍜?.."<BR>      file1.getCanonicalFile();<BR>      file2.getCanonicalFile();<BR>    }<BR>    catch(Exception e){}<BR>    return file1.equals(file2);//true<BR>  }</P> <P>  /**<BR>   * 鍒涘緩涓涓復鏃秚emporary鏂囦歡<BR>   * @param args<BR>   */<BR>  public void createTempFile()<BR>  {<BR>    try<BR>      {<BR>        //create temporary file<BR>        File temp = new File("temp", ".txt");<BR>        //鎺ㄥ嚭紼嬪簭鏃跺垹闄emp鏂囦歡<BR>        temp.deleteOnExit();</P> <P>        //鍚憈emp鏂囦歡涓啓content<BR>        BufferedWriter out = new BufferedWriter(new FileWriter(temp));<BR>        out.write("鐔婄偧");<BR>        out.close();<BR>      }<BR>      catch(IOException e)<BR>      {<BR>        e.printStackTrace();<BR>      }<BR>  }</P> <P>  /**<BR>   * File銆乨irectory鏇村悕鎴朏ile縐誨姩鍒板彟涓涓綅緗?BR>   * @param args<BR>   */<BR>  public void rename_move_File()<BR>  {<BR>    //rename a File or directory<BR>    File file1=new File("oldname");<BR>    File file2=new File("newname");<BR>    file1.renameTo(file2);</P> <P>    //move File<BR>    File file=new File("filename");<BR>    File dir=new File("directoryname");<BR>    file.renameTo(new File(dir,file.getName()));<BR>  }</P> <P>  public static void main(String[] args)<BR>  {</P> <P>  }</P> <P> </P> <P>  }</P><img src ="http://www.aygfsteel.com/javainthinking/aggbug/8519.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javainthinking/" target="_blank">鐔婄偧鐨勪釜鎬х┖闂村拰java瀛︿範涔嬫梾</a> 2005-07-27 09:07 <a href="http://www.aygfsteel.com/javainthinking/archive/2005/07/27/8519.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">察哈</a>| <a href="http://" target="_blank">布尔津县</a>| <a href="http://" target="_blank">淮北市</a>| <a href="http://" target="_blank">开原市</a>| <a href="http://" target="_blank">绩溪县</a>| <a href="http://" target="_blank">乌苏市</a>| <a href="http://" target="_blank">昌都县</a>| <a href="http://" target="_blank">海门市</a>| <a href="http://" target="_blank">雷州市</a>| <a href="http://" target="_blank">什邡市</a>| <a href="http://" target="_blank">牙克石市</a>| <a href="http://" target="_blank">大余县</a>| <a href="http://" target="_blank">万载县</a>| <a href="http://" target="_blank">商河县</a>| <a href="http://" target="_blank">桂平市</a>| <a href="http://" target="_blank">什邡市</a>| <a href="http://" target="_blank">文登市</a>| <a href="http://" target="_blank">盘锦市</a>| <a href="http://" target="_blank">五家渠市</a>| <a href="http://" target="_blank">九龙城区</a>| <a href="http://" target="_blank">定边县</a>| <a href="http://" target="_blank">临清市</a>| <a href="http://" target="_blank">寻甸</a>| <a href="http://" target="_blank">开平市</a>| <a href="http://" target="_blank">桐城市</a>| <a href="http://" target="_blank">阿图什市</a>| <a href="http://" target="_blank">石渠县</a>| <a href="http://" target="_blank">阿拉善右旗</a>| <a href="http://" target="_blank">嵊州市</a>| <a href="http://" target="_blank">秦皇岛市</a>| <a href="http://" target="_blank">黔南</a>| <a href="http://" target="_blank">新乡市</a>| <a href="http://" target="_blank">金沙县</a>| <a href="http://" target="_blank">包头市</a>| <a href="http://" target="_blank">福建省</a>| <a href="http://" target="_blank">嘉祥县</a>| <a href="http://" target="_blank">东兴市</a>| <a href="http://" target="_blank">思茅市</a>| <a href="http://" target="_blank">石河子市</a>| <a href="http://" target="_blank">芷江</a>| <a href="http://" target="_blank">贵南县</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>