亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jsp文件操作之讀取篇.txt

?? java技術綜合: 總結多家java技術論壇中的常見問題
?? TXT
字號:
作者:asp3000
email: coolknight@263.net
日期:2000-8-8 12:00:20
jsp文件操作之讀取篇(本站文章)

轉載請注明來源
來源 jsp中國論壇 http://jspbbs.yeah.net

Read.jsp

<html>
<head>
<title>Read a file</title>
</head>
<body bgcolor="#000000">

<jsp:useBean id="reader" class="DelimitedDataFile" scope="request">
  <jsp:setProperty name="reader" property="path" value="/path/to/afile.txt" />
</jsp:useBean>

<h3>Contents of the file:</h3>

<p>

<% int count = 0; %> 
<% while (reader.nextRecord() != -1) { %>
  <% count++; %>      
  <b>Line <% out.print(count); %>:</b> <% out.print(reader.returnRecord()); %><br>    
<% } %>  
</p>
</body>
</html>



import java.io.*;
import java.util.StringTokenizer;

public class DelimitedDataFile 
{
   /**
    * DelimitedDataFile.java
    * Written by Morgan Catlin  Email: mfcatlin@csclub2.stthomas.edu
    *   April 6, 1999
    * 
    * Variables:
    *   String currentRecord = the record the bean is currently working on
    *   BufferedReader file = the file the bean is working with
    *   String path = the path to the file (ie. /home/you/afile.txt)
    *   StringTokenizer token = the currentRecord tokenized
    * 
    * Methods:
    *   public void setPath() - creates a BufferedReader that reads the file in path
    *   public String getPath() - returns path
    *   public void fileClose() - closes the file that is being read
    *   public int nextRecord() - reads the next record(line) in the file, 
    *                              and returns the number of tokens in the record 
    *                              or else returns -1 if there aren't anymore records
    *   public double returnDouble() - returns the next token as a double
    *   public int returnInt() - returns the next token as an int
    *   public String returnString() - returns the next token as a String
    *   public String returnRecord() - returns the entire record as a String
    */
   
          private String           currentRecord = null;
          private BufferedReader   file;
          private String           path;
          private StringTokenizer  token;
   
          public DelimitedDataFile()
                {
                    file = new BufferedReader(new InputStreamReader(System.in),1);
                } // constructor 1 
          public DelimitedDataFile(String filePath) throws FileNotFoundException
                {
                    // gets file
                    path = filePath;
                    file = new BufferedReader(new FileReader(path));
                } // constructor DelimitedDataFile
    
      public void setPath(String filePath)
        {
            // sets the file
            path = filePath;
                        try {
                             file = new BufferedReader(new
                             FileReader(path));
                        } catch (FileNotFoundException e) {
            System.out.println("file not found");
            }
    
        } // method setPath

           public String getPath() {
        return path;
          } // method getPath
   
          public void fileClose() throws IOException
                {
                    // closes file
                    file.close();
                } // method fileClose
   
          public int nextRecord()
                {
                    // this method reads the next record and returns the number of
                    // tokens or else returns -1
    
                    int returnInt = -1;
                    try
                        {
                            currentRecord = file.readLine();
                        } // end try
    
                    catch (IOException e)
                        {
                            System.out.println("readLine problem, terminating.");
                        } // end catch
    
                    if (currentRecord == null)
                        returnInt = -1;
                    else
                        {
                             token = new StringTokenizer(currentRecord);
                             returnInt = token.countTokens();
                        } // end else
                    return returnInt;
                } // method nextRecord
   
          public double returnDouble()
                {
                    // this method returns the next token as a double
                    double doubleReturn = Double.valueOf(token.nextToken()).doubleValue();
                    return doubleReturn;
                } // method returnDouble
   
          public int returnInt()
                {
                    // this method returns the next token as an int
                    int returnint = Integer.parseInt(token.nextToken());
                    return returnint;
                } // method returnInt
   
          public String returnString()
                {
                    // this method returns the next token as a String
                    String stringReturn = token.nextToken();
                    return stringReturn;
                } // method returnString
        
          public String returnRecord()
               {
                       // this method returna the entire record as a string
                       return currentRecord;
               }  // method returnRecord
    } // class DelimitedDataFile

轉載請注明來源
來源 jsp中國論壇 http://jspbbs.yeah.net 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合给合久久狠狠狠97色69| 7777精品久久久大香线蕉| 亚洲国产日产av| 欧美日本视频在线| 欧美性大战xxxxx久久久| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 国产成人av网站| 蜜桃视频一区二区三区在线观看| 亚洲一级在线观看| 夜夜操天天操亚洲| 亚洲婷婷综合色高清在线| 日本一区二区三区国色天香 | 久久99九九99精品| 一区二区三区小说| 18欧美亚洲精品| 日本一区二区久久| 国产精品久久综合| 欧美高清在线一区| 中文字幕欧美国产| 中文字幕欧美日韩一区| 欧美国产日韩亚洲一区| 欧美国产欧美综合| 国产精品超碰97尤物18| 国产色一区二区| 日韩午夜电影av| 欧美一级生活片| 日韩视频一区二区三区| 制服视频三区第一页精品| 欧美精选午夜久久久乱码6080| 欧美午夜精品理论片a级按摩| 欧洲亚洲国产日韩| 欧美日韩免费一区二区三区视频| 欧美三级在线播放| 欧美高清性hdvideosex| 欧美日韩国产免费| 精品视频1区2区| 欧美mv日韩mv国产网站| 国产无人区一区二区三区| 国产精品久久久久久久岛一牛影视| 欧美韩国日本不卡| 亚洲一区国产视频| 日韩精品成人一区二区三区| 日韩国产欧美在线播放| 国产精品自拍一区| 日本久久一区二区| 欧美精品一区二区久久婷婷| 自拍av一区二区三区| 日本vs亚洲vs韩国一区三区二区| 国产成人在线视频免费播放| 91在线看国产| 日韩欧美亚洲国产精品字幕久久久| 中文天堂在线一区| 亚洲不卡在线观看| 成人ar影院免费观看视频| 3d动漫精品啪啪一区二区竹菊| 国产日韩欧美精品在线| 亚洲成av人片在线| 91在线porny国产在线看| 欧美大片在线观看一区二区| 亚洲精品高清在线观看| 国产精品18久久久久久久久| 欧美日韩国产精品自在自线| 国产精品丝袜一区| 久久99精品国产麻豆婷婷洗澡| 91美女视频网站| 国产色产综合产在线视频| 日韩激情中文字幕| 欧美日韩激情在线| 中文字幕亚洲欧美在线不卡| 精品写真视频在线观看| 欧美日韩精品免费| 亚洲视频一区二区在线观看| 韩国v欧美v亚洲v日本v| 6080日韩午夜伦伦午夜伦| 亚洲精品国产第一综合99久久| 国产成人精品亚洲日本在线桃色| 91精品国产美女浴室洗澡无遮挡| 亚洲精品视频自拍| 成人v精品蜜桃久久一区| 欧美va天堂va视频va在线| 午夜视频在线观看一区二区| 91在线观看高清| 中文字幕欧美三区| 国产电影一区在线| 欧美sm极限捆绑bd| 久久99精品国产.久久久久 | 国产三级三级三级精品8ⅰ区| 视频一区国产视频| 亚洲国产欧美在线| 久久女同互慰一区二区三区| 国产一区二区三区av电影| 欧美日韩国产精品成人| 亚洲人成网站色在线观看| 九色|91porny| 久久久亚洲精华液精华液精华液| 加勒比av一区二区| 亚洲精品一区二区三区精华液 | 精品一区二区三区在线观看| 日本精品一级二级| 蜜臀a∨国产成人精品| 欧美成人精品3d动漫h| 亚洲国产综合色| 国模一区二区三区白浆| 日韩视频免费直播| 成人永久aaa| 亚洲成人精品一区二区| 国产亚洲精品7777| 日韩女同互慰一区二区| 在线精品亚洲一区二区不卡| 九九九精品视频| 天天射综合影视| 亚洲免费在线视频一区 二区| 91精品免费观看| 色狠狠综合天天综合综合| 国产成人精品一区二区三区四区| 亚洲bt欧美bt精品| 亚洲综合色丁香婷婷六月图片| 国产日产欧美一区二区视频| 日韩亚洲欧美高清| 日本视频中文字幕一区二区三区| 香蕉久久夜色精品国产使用方法| 久久久国际精品| 欧美一区二区黄色| 欧美一区二区三区电影| 欧美视频日韩视频在线观看| 色94色欧美sute亚洲13| www.亚洲人| www.激情成人| av亚洲精华国产精华精| 日本伦理一区二区| 日韩精品一级中文字幕精品视频免费观看 | 国产欧美日韩精品在线| 欧美激情一区二区三区四区| 国产精品美女久久久久aⅴ国产馆| 欧美激情中文字幕| 国产日韩高清在线| 中文字幕亚洲欧美在线不卡| 亚洲桃色在线一区| 亚洲伦理在线精品| 欧美一区二区三区啪啪| 精品日韩99亚洲| 国产日韩欧美一区二区三区综合| 国产日韩精品一区二区三区在线| 国产日韩av一区| 亚洲成人免费视| 另类人妖一区二区av| 99视频热这里只有精品免费| 欧洲一区二区av| 精品日韩99亚洲| 亚洲国产乱码最新视频| 国产传媒欧美日韩成人| 一本到高清视频免费精品| 色哦色哦哦色天天综合| 3atv在线一区二区三区| 国产精品免费视频一区| 日韩福利电影在线| 91在线视频观看| www欧美成人18+| 午夜精品久久久久久久久久久| 国产精品自产自拍| 日韩三级.com| 丝袜美腿亚洲色图| 一道本成人在线| 中文成人av在线| 亚洲成a人片在线观看中文| 久久精品国产77777蜜臀| 欧美一二三四在线| 午夜激情久久久| 在线观看网站黄不卡| 亚洲欧美综合色| 国产成a人亚洲精品| 欧美韩国日本不卡| 成人综合激情网| 国产日韩欧美高清| 菠萝蜜视频在线观看一区| 久久久久久久久久久久电影 | 国产91丝袜在线播放0| 欧美一区二区三区在线看| 亚洲成a人片在线不卡一二三区| 91视频.com| 亚洲成人午夜电影| 欧美乱熟臀69xxxxxx| 亚洲自拍偷拍九九九| 日韩视频免费直播| 亚洲国产乱码最新视频| 亚洲一区二区不卡免费| 91在线你懂得| 国产亚洲va综合人人澡精品| 成人一道本在线| 亚洲精品成人在线| 欧美日韩另类国产亚洲欧美一级| 91精品婷婷国产综合久久性色| 国产毛片精品一区| 亚洲第一电影网| 国产精品国产三级国产普通话99| 日韩精品自拍偷拍| 欧美一区二区三区在线看| 欧美日韩综合不卡| 91麻豆123| 99re66热这里只有精品3直播 |