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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? simreport.java

?? 中間件開發(fā)詳細(xì)說明:清華大學(xué)J2EE教程講義(ppt)-Tsinghua University J2EE tutorial lectures (ppt) [上載源碼成為會(huì)員下載此源碼] [成為VIP會(huì)
?? JAVA
字號(hào):
/* * Title:        GridSim Toolkit * Description:  GridSim (Grid Simulation) Toolkit for Modeling and Simulation *               of Parallel and Distributed Systems such as Clusters and Grids * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html * * $Id: SimReport.java,v 1.3 2005/01/05 06:10:04 anthony Exp $ */package gridsim.util;import gridsim.*;import java.io.*;/** * Records any information that is needed by a GridSim entity. * It is the responsibility of each entity to record data. <br> * <tt>NOTE:</tt> before the simulation ends, call {@link #finalWrite()} * to finalize writing the data into a file and close it. * Forgotten to call this method will result in not writing * into a file at all. * <p> * Given the file name, this class will record information in * CSV (Comma delimited) format (*.csv) with the first column usually * represents the simulation time. The format of the next columns * afterward is the responsibility of the coder. * * @since GridSim Toolkit 3.1 * @author Anthony Sulistio * @invariant $none */public class SimReport{    private String name_;    private StringBuffer buffer_;    private final int SIZE = 1000;    private BufferedOutputStream outBuffer_;    private String indent_;    /** A space-delimited text file, i.e. each column is separated by a space */    public static int INDENT_SPACE = 0;        /** A comma-delimited text file, i.e. each column is separated by a comma */    public static int INDENT_COMMA = 1;        /** A tab-delimited text file, i.e. each column is separated by a tab */    public static int INDENT_TAB   = 2;    /**     * Creates a new report file. This constructor will automatically append     * the file extension to the given parameter. Use {@link #finalWrite()}     * before exiting to write the data into a file and close it.     * Forgotten to call this method will result in not writing     * into a file at all.<br>     * NOTE: By default, each column inside this file is separated by a comma.     * <br>     * <b>WARNING:</b> existing file with the same name will be overwritten.     * @param name  file/entity name     * @throws ParameterException  This happens when name is invalid or null.     * @pre name != null     * @post $none     */    public SimReport(String name) throws ParameterException {        this(name, INDENT_SPACE);    }        /**     * Creates a new report file. This constructor will automatically append     * the file extension to the given parameter. Use {@link #finalWrite()}     * before exiting to write the data into a file and close it.     * Forgotten to call this method will result in not writing     * into a file at all.     * <br>     * <b>WARNING:</b> existing file with the same name will be overwritten.     * @param name    file/entity name     * @param indent  type of indentation (either a space, a comma or a tab)     * @throws ParameterException  This happens when name is invalid or null.     * @pre name != null     * @post $none     */    public SimReport(String name, int indent) throws ParameterException    {        String msg = "SimReport(): Error - ";        if (name == null || name.length() == 0)        {            msg += "invalid name.";            System.out.println(msg);            throw new ParameterException(msg);        }        name_ = name + ".csv";        try        {            FileOutputStream out = new FileOutputStream(name_);            outBuffer_ = new BufferedOutputStream(out);        }        catch(Exception e)        {            msg += "unable to create/overwrite " + name_;            System.out.println(msg);            throw new ParameterException(msg);        }        buffer_ = new StringBuffer(SIZE);                if (indent == INDENT_SPACE) {            indent_ = " ";        }        else if (indent == INDENT_COMMA) {            indent_ = ", ";        }        else if (indent == INDENT_TAB) {            indent_ = "\t";        }        else {            indent_ = ", ";        }            }    /**     * Write the given data into the file. <br>     * For each row, the format would be: <tt>simulation time, num, desc</tt>.     * The <tt>simulation time</tt> is automatically handle inside this method.     * @param   num     integer number     * @param   desc    the description of this number     * @pre $none     * @post $none     */    public void write(int num, String desc)    {        buffer_.append( GridSim.clock() );        buffer_.append(indent_);        buffer_.append(num);        buffer_.append(indent_);        buffer_.append(desc);        buffer_.append("\n");        writeToFile();    }    /**     * Write the given data into the file. <br>     * For each row, the format would be: <tt>simulation time, num, desc</tt>.     * The <tt>simulation time</tt> is automatically handle inside this method.     * @param   num     decimal number     * @param   desc    the description of this number     * @pre $none     * @post $none     */    public void write(double num, String desc)    {        buffer_.append( GridSim.clock() );        buffer_.append(indent_);        buffer_.append(num);        buffer_.append(indent_);        buffer_.append(desc);        buffer_.append("\n");        writeToFile();    }    /**     * Write the given data into the file. <br>     * For each row, the format would be: <tt>simulation time, num, desc</tt>.     * The <tt>simulation time</tt> is automatically handle inside this method.     * @param   num     long number     * @param   desc    the description of this number     * @pre $none     * @post $none     */    public void write(long num, String desc)    {        buffer_.append( GridSim.clock() );        buffer_.append(indent_);        buffer_.append(num);        buffer_.append(indent_);        buffer_.append(desc);        buffer_.append("\n");        writeToFile();    }    /**     * Write the given data into the file. <br>     * For each row, the format would be: <tt>simulation time, desc</tt>.     * The <tt>simulation time</tt> is automatically handle inside this method.     * @param   data    data to be recorded     * @pre $none     * @post $none     */    public void write(String data)    {        buffer_.append( GridSim.clock() );        buffer_.append(indent_);        buffer_.append(data);        buffer_.append("\n");        writeToFile();    }    /**     * If the string buffer reaches max. limit, then write all into     * a file.     * @pre $none     * @post $none     */    private void writeToFile()    {        try        {            int len = buffer_.length();            if (len >= SIZE)            {                // write into a file                outBuffer_.write( buffer_.toString().getBytes() );                // delete all the existing strings                buffer_.delete(0, len);            }        }        catch(Exception e)        {            System.out.println(name_ + ".writeToFile(): Error - " +                "unable to write into a file.");        }    }    /**     * Finalize the recording by writing all the previously given     * information into a file. <br>     * Forgotten to call this method will result in not writing     * into a file at all.     * @pre $none     * @post $none     */    public void finalWrite()    {        try        {            outBuffer_.write( buffer_.toString().getBytes() );            outBuffer_.close();        }        catch(Exception e)        {            System.out.println(name_ + ".finalWrite(): Error - " +                "unable to write and to close a file sucessfully.");        }    }} // end class

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲一区二区三区在线观看| 麻豆精品在线看| 天堂成人免费av电影一区| 美女任你摸久久| 国产精品一二一区| 日韩午夜激情视频| 亚洲色图丝袜美腿| 亚洲天堂网中文字| 欧美激情一区二区在线| 久久久电影一区二区三区| 亚洲色图丝袜美腿| 日本美女一区二区三区| 波波电影院一区二区三区| 欧美男同性恋视频网站| 国产欧美日韩另类一区| 亚洲成人av电影在线| 成人综合婷婷国产精品久久免费| 欧洲一区在线观看| 国产日韩一级二级三级| 亚洲成人黄色小说| 成人av在线播放网站| 日韩一区二区三区高清免费看看| 国产精品护士白丝一区av| 日本va欧美va欧美va精品| 国产成人啪午夜精品网站男同| 欧美性大战久久久久久久蜜臀 | 久久奇米777| 一区二区三区蜜桃| 国产美女精品在线| 精品视频在线免费观看| 国产精品入口麻豆原神| 九色综合狠狠综合久久| 在线观看日韩电影| caoporm超碰国产精品| 久久99久久精品| 国内精品伊人久久久久av一坑| 91性感美女视频| 久久色视频免费观看| 日韩电影在线免费| 色综合久久九月婷婷色综合| 久久先锋影音av鲁色资源| 日韩电影在线免费| 91蜜桃网址入口| 欧美日韩国产小视频在线观看| 中文一区二区在线观看| 精品一区二区三区影院在线午夜| 欧美挠脚心视频网站| 亚洲精品中文字幕乱码三区| 国产91精品一区二区麻豆网站| 欧美刺激午夜性久久久久久久| 亚洲国产一区在线观看| 色狠狠桃花综合| 中文字幕中文字幕一区二区| 国产高清一区日本| 精品久久人人做人人爽| 麻豆国产欧美一区二区三区| 欧美乱妇一区二区三区不卡视频| 亚洲男人的天堂在线aⅴ视频| 成人av片在线观看| 国产精品久久久久久久久免费丝袜| 天堂久久一区二区三区| 国产精品一二三四| 26uuu久久天堂性欧美| 九九精品视频在线看| 日韩片之四级片| 美国三级日本三级久久99 | 一区二区免费在线播放| 91捆绑美女网站| 亚洲女同女同女同女同女同69| 国产成人激情av| 国产精品久久久久久久久搜平片 | 亚洲色图视频网| 94-欧美-setu| 一区二区三区免费| 欧美亚洲另类激情小说| 亚洲国产wwwccc36天堂| 欧美美女一区二区| 五月婷婷激情综合网| 在线播放/欧美激情| 免费人成精品欧美精品| 日韩一区二区三区在线视频| 久久99精品网久久| 国产亚洲视频系列| eeuss国产一区二区三区| 亚洲精品日日夜夜| 欧美日韩综合在线免费观看| 日韩av电影天堂| 精品国偷自产国产一区| 国产精品996| **性色生活片久久毛片| 欧美无砖专区一中文字| 爽好久久久欧美精品| 精品奇米国产一区二区三区| 国产美女在线观看一区| 国产精品久久久久9999吃药| 色婷婷激情一区二区三区| 婷婷综合五月天| 亚洲精品在线电影| www.色综合.com| 亚洲国产精品精华液网站| 日韩一区二区在线观看| 福利电影一区二区| 亚洲一区二区成人在线观看| 欧美一级免费观看| 国产成人鲁色资源国产91色综| ㊣最新国产の精品bt伙计久久| 欧美视频一区二区| 精品一区二区免费| 亚洲天堂精品视频| 91精品国产乱| 懂色av一区二区三区免费观看| 亚洲欧美另类久久久精品2019| 91精品婷婷国产综合久久性色| 国产精品一二三区| 一区二区三区不卡视频| 日韩一区二区麻豆国产| 不卡一区二区在线| 亚洲国产日韩a在线播放性色| 精品三级在线看| 色综合天天综合网天天看片| 青青国产91久久久久久| 中文字幕一区二区在线播放| 91精品国产色综合久久| 成人午夜看片网址| 一区二区三区四区乱视频| 99视频一区二区| 久久综合狠狠综合久久激情| 亚洲丝袜另类动漫二区| 日韩激情一区二区| 国产精品18久久久| 欧美一级日韩一级| 亚洲免费观看高清完整版在线观看熊 | 亚洲综合色噜噜狠狠| 亚洲另类中文字| 成人午夜免费视频| 久久综合狠狠综合久久激情| 亚洲女与黑人做爰| 日韩av电影免费观看高清完整版| 国产.精品.日韩.另类.中文.在线.播放 | 国产精品美女久久福利网站| 国产亚洲精品bt天堂精选| 亚洲欧美日韩中文字幕一区二区三区 | 欧美岛国在线观看| 性做久久久久久久免费看| 一本到高清视频免费精品| 欧美一区二区三区日韩视频| 精品国产露脸精彩对白| 日韩主播视频在线| 国产精品91一区二区| 欧美剧在线免费观看网站| 国产精品美女久久久久久久久久久 | 7777精品伊人久久久大香线蕉最新版| 欧美一级精品在线| 中文字幕高清不卡| 加勒比av一区二区| 欧美三级在线看| 亚洲日本在线a| 成人黄色免费短视频| 欧美精品一区二区三区蜜臀 | 丝瓜av网站精品一区二区| 成人少妇影院yyyy| 精品日韩欧美在线| 99re在线视频这里只有精品| 精品国产亚洲一区二区三区在线观看 | 美女网站视频久久| 91麻豆福利精品推荐| 国产精品欧美一区喷水| 欧美精品乱码久久久久久按摩| jvid福利写真一区二区三区| 蓝色福利精品导航| 国产福利一区在线观看| 精品一区二区三区在线观看国产| 日韩av电影一区| 日本va欧美va精品发布| 亚洲自拍偷拍麻豆| 一区二区三区视频在线看| 亚洲视频资源在线| 亚洲欧美日韩一区| 亚洲丝袜自拍清纯另类| 国产69精品一区二区亚洲孕妇| 精品国产污污免费网站入口| 免费成人av在线| 2022国产精品视频| 国产福利视频一区二区三区| 国产精品网站在线播放| 色综合久久久久网| 中文字幕亚洲一区二区va在线| 国产成人免费视频网站高清观看视频 | 91精品久久久久久久久99蜜臂| 91视频一区二区三区| 亚洲二区在线观看| 亚洲免费成人av| 亚洲一区二区三区四区的| 亚洲国产人成综合网站| 综合在线观看色| 亚洲欧美日韩国产另类专区| 国产精品国产馆在线真实露脸| 国产精品久久免费看| 在线视频欧美精品| 亚洲国产日韩一区二区|