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

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

?? script.java

?? java 平臺 telnet 繁體中文版
?? JAVA
字號:
/* * This file is part of "The Java Telnet Application". * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * "The Java Telnet Application" is distributed in the hope that it will be  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING.  If not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */package de.mud.jta.plugin;import de.mud.jta.Plugin;import de.mud.jta.FilterPlugin;import de.mud.jta.PluginBus;import de.mud.jta.PluginConfig;import de.mud.jta.event.ConfigurationListener;import de.mud.jta.event.OnlineStatusListener;import java.io.IOException;import java.util.Vector;/** * The script plugin takes a series of match and answer pairs to compare * the incoming data with the matches and if it succeeds writes the answers * back. It then moves on to the next match until all script elements have * matched.<P> * The script property Script.script should contain <B>|</B> separated strings * where each two represent a match and answer pair. A newline will be appended * to each answer!<P> * The script is very basic but is a very good example how to * write a plugin for <B>The Java<SUP>tm</SUP> Telnet Application</B>. * <P> * <B>Maintainer:</B> Matthias L. Jugel * * @version $Id: Script.java,v 2.4 2000/03/17 06:47:32 leo Exp $ * @author Matthias L. Jugel, Marcus Mei遪er */public class Script extends Plugin implements FilterPlugin {  /** debugging level */  private final static int debug = 0;  /** the script after parsing, saved for reinitialization */  private Vector savedScript;  /**   * Create a new scripting plugin.   */  public Script(PluginBus bus, final String id) {    super(bus, id);    bus.registerPluginListener(new OnlineStatusListener() {      public void online() {        setup(savedScript);      }      public void offline() {        // ignore disconnection      }    });    bus.registerPluginListener(new ConfigurationListener() {      public void setConfiguration(PluginConfig config) {        savedScript = new Vector();        String s = config.getProperty("Script", id, "script");        if(s != null) {	  // check if the script is stored in a file	  if(s.charAt(0) == '@') {	    Script.this.error("@file not implemented yet");	  }	  // parse the script and set up  	  if(debug > 0) Script.this.error(s);	  String pair[] = null;          int old = -1, idx = s.indexOf('|');          while(idx >= 0) {	    if(pair == null) {	      pair = new String[2];              pair[0] = s.substring(old + 1, idx);	      if(debug > 0) System.out.print("match("+pair[0]+") -> ");	    } else {              pair[1] = s.substring(old + 1, idx)+"\n";	      if(debug > 0) System.out.print(pair[1]);	      savedScript.addElement(pair);	      pair = null;	    }            old = idx;            idx = s.indexOf('|', old + 1);          }          if(pair != null) {	    pair[1] = s.substring(old + 1)+"\n";	    savedScript.addElement(pair);	    if(debug > 0) System.out.print(pair[1]);	  } else	    Script.this.error("unmatched pairs of script elements");	   // set up the script	  //  setup(savedScript);        }      }    });  }  /** holds the data source for input and output */  protected FilterPlugin source;  /**   * Set the filter source where we can read data from and where to   * write the script answer to.   * @param plugin the filter plugin we use as source   */  public void setFilterSource(FilterPlugin plugin) {    source = plugin;  }  /**   * Read an array of bytes from the back end and put it through the   * script parser to see if it matches. It will send the answer    * immediately to the filter source if a match occurs.   * @param b the array where to read the bytes in   * @return the amount of bytes actually read   */  public int read(byte[] b) throws IOException {    int n = source.read(b);    if(n > 0) match(b, n);    return n;  }  public void write(byte[] b) throws IOException {    source.write(b);  }  // =================================================================  // the actual scripting code follows:  // =================================================================  private int matchPos;		// current position in the match  private Vector script;	// the actual script  private byte[] match;		// the current bytes to look for  private boolean done = true;	// no script!  /**   * Setup the parser using the passed script. The script contains for   * every element a two-element array of String where element zero   * contains the match and element one the answer.   * @param script the script   */  private void setup(Vector script) {    // clone script to make sure we do not change the original    this.script = (Vector)script.clone();    if(debug > 0)       System.err.println("Script: script contains "+script.size()+" elements");    match = ((String[])this.script.firstElement())[0].getBytes();    reset();    done = false;  }  /**   * Try to match the byte array s against the most current script match.   * It will write the answer immediatly  if the script matches and   * will return instantly when all the script work is done.   * @param s the array of bytes to match against   * @param length the amount of bytes in the array   */  private void match(byte[] s, int length) throws IOException {    for(int i = 0; !done && i < length; i++) {      if(s[i] == match[matchPos]) {        // the whole thing matched so, return the match answer         // and reset to use the next match        if(++matchPos >= match.length)          write(found());      } else // if the current character did not match reset         reset();    }  }  /**   * This method is called when a script match was found and will   * setup the next match to be used and return the answer for the   * just found one.   * @return the answer to the found match   */  private byte[] found() {    if(debug > 0) System.err.println("Script: found '"+new String(match)+"'");    // we have matched the string, so remember the answer ...    byte[] answer = ((String[])script.firstElement())[1].getBytes();    // remove the matched element    script.removeElementAt(0);    // set the next match if applicable    if(!script.isEmpty()) {      match = ((String[])script.firstElement())[0].getBytes();      reset();    } else      done = true;    return answer;  }  /**   * Reset the match position counter.   */  private void reset() {    matchPos = 0;  }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品亚洲aⅴ乱码一区二区三区| 麻豆中文一区二区| 亚洲国产精品一区二区www| 美国十次综合导航| 欧美色网站导航| 一区视频在线播放| 国产一区中文字幕| 欧美精品日韩精品| 亚洲自拍偷拍av| 99久久精品国产麻豆演员表| 精品国产99国产精品| 亚洲午夜在线观看视频在线| 99精品国产热久久91蜜凸| 国产午夜一区二区三区| 久久99精品国产.久久久久| 欧美精品一卡二卡| 亚洲一区二区三区激情| 色88888久久久久久影院野外 | 国产精品久线观看视频| 国内精品久久久久影院色| 欧美老人xxxx18| 日日夜夜一区二区| 欧美日韩精品一区二区三区蜜桃 | 亚洲第一成年网| 色av一区二区| 一区二区三区日韩在线观看| www..com久久爱| 国产精品第一页第二页第三页| 国产精品一卡二卡| 国产婷婷一区二区| 国产精品一区二区在线观看不卡 | 国产福利不卡视频| 国产日产欧美精品一区二区三区| 国产毛片精品视频| 国产欧美精品区一区二区三区| 粉嫩av一区二区三区在线播放| 久久免费看少妇高潮| 丁香网亚洲国际| 国产精品高清亚洲| 91亚洲国产成人精品一区二三| 亚洲欧洲日韩女同| 在线视频欧美区| 日本中文字幕一区二区视频 | 制服丝袜国产精品| 免费精品视频最新在线| 亚洲精品在线三区| 成人国产在线观看| 亚洲中国最大av网站| 91精品国产一区二区三区香蕉| 青青草原综合久久大伊人精品| 日韩亚洲欧美中文三级| 国产在线播放一区三区四| 久久久不卡影院| 91在线视频网址| 日韩黄色一级片| 国产欧美一区二区三区沐欲| 一本色道久久综合亚洲精品按摩| 偷拍一区二区三区| 久久综合视频网| 一本大道久久a久久精二百| 日韩av网站免费在线| 亚洲国产精品高清| 欧美三日本三级三级在线播放| 国精产品一区一区三区mba视频 | 精品久久久久久最新网址| 国产成人免费9x9x人网站视频| 日韩一区日韩二区| 91精品国产综合久久香蕉的特点| 国产高清不卡一区二区| 一区二区三区免费网站| 欧美刺激脚交jootjob| 91在线视频观看| 精品亚洲免费视频| 一区二区在线免费| 国产亚洲1区2区3区| 欧美精三区欧美精三区| 国产精品69毛片高清亚洲| 亚洲高清免费观看 | 99精品热视频| 久久不见久久见中文字幕免费| 中文字幕一区在线观看| 欧美一级一区二区| 色婷婷综合久久久中文一区二区 | 午夜久久久久久久久| 国产女人aaa级久久久级| 777奇米成人网| 91网站最新网址| 国产宾馆实践打屁股91| 奇米精品一区二区三区在线观看一 | 久久精品这里都是精品| 欧美少妇一区二区| 91年精品国产| 99精品视频中文字幕| 国产成人免费视| 精品一区二区三区在线播放 | 欧美私模裸体表演在线观看| 大陆成人av片| 国产在线一区二区| 日本在线不卡视频| 亚洲地区一二三色| 亚洲综合久久久| 最新久久zyz资源站| 欧美国产国产综合| 中文字幕乱码一区二区免费| 久久综合五月天婷婷伊人| 日韩欧美国产午夜精品| 欧美一区二区三区视频在线观看| 欧洲一区二区av| 欧美亚洲愉拍一区二区| 日本电影亚洲天堂一区| 色婷婷综合激情| 欧美中文字幕一区| 欧美自拍偷拍一区| 精品视频一区二区不卡| 欧美日韩亚洲综合一区二区三区 | 日韩精品一区二区三区视频播放 | 久久国产剧场电影| 精品一区二区影视| 国产麻豆一精品一av一免费| 国产成人综合在线播放| 国产精品1区二区.| 成人激情av网| 91视频免费观看| 欧洲视频一区二区| 91精品国产美女浴室洗澡无遮挡| 5月丁香婷婷综合| 欧美变态tickling挠脚心| 久久久高清一区二区三区| 亚洲欧洲成人精品av97| 亚洲国产欧美在线| 日韩av在线发布| 国产成人h网站| 欧洲亚洲国产日韩| 日韩精品中午字幕| 中文在线一区二区| 亚洲国产成人91porn| 蜜臀91精品一区二区三区 | 欧美亚洲禁片免费| 欧美成人三级在线| 国产精品私房写真福利视频| 亚洲欧美偷拍三级| 美洲天堂一区二卡三卡四卡视频| 国产精品自拍网站| 欧美视频精品在线| 久久久久高清精品| 夜夜爽夜夜爽精品视频| 久久国产免费看| 欧美在线观看视频在线| 欧美α欧美αv大片| 亚洲精品视频自拍| 国产精品自拍网站| 欧美怡红院视频| 中文欧美字幕免费| 日韩国产一区二| 99视频有精品| 日韩欧美第一区| 一级做a爱片久久| 国产99精品在线观看| 91精品国产一区二区三区香蕉| 日本一区二区三区四区| 日本视频中文字幕一区二区三区| 粉嫩av一区二区三区粉嫩| 欧美一级午夜免费电影| 亚洲精品高清在线观看| 国产xxx精品视频大全| 91精品午夜视频| 亚洲精品免费看| 国产成人亚洲综合a∨婷婷图片| 欧美日韩成人在线| 亚洲黄网站在线观看| 国产91丝袜在线播放0| 精品日韩一区二区| 午夜精品久久久久久久| www.欧美日韩| 国产精品天干天干在线综合| 精东粉嫩av免费一区二区三区| 欧美视频一区二区三区在线观看| 国产精品久久久久久久久果冻传媒 | 久草中文综合在线| 欧美亚洲尤物久久| 亚洲人成在线观看一区二区| 国产精品66部| 久久人人爽人人爽| 九九国产精品视频| 91精品国产福利| 亚洲一区二区不卡免费| 日本韩国欧美一区二区三区| 国产精品私房写真福利视频| 久久不见久久见免费视频7 | 久88久久88久久久| 欧美精品在欧美一区二区少妇| 一区二区三区欧美日| 色婷婷狠狠综合| 一区二区三区欧美激情| 欧美性欧美巨大黑白大战| 亚洲欧美视频一区| 在线观看区一区二| 天天做天天摸天天爽国产一区| 91超碰这里只有精品国产| 亚洲成人免费视频|