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ڞ-7/+x%@ K e ࣝ#'v!ܝX3@a:@#<,KJ Vy'KMC29 )x=0dSDiboQ\R 1h7_"EnEvPiፒT"?KCq\4r̵ʁ҈o9Ifb (DɉT46XbP~)/璕,Һrki_ O$99Ɔ7̓sJa`Gd7aJ-gp[v)㵨*˕ݽxٷ4+V& @(ԍ<}Q36p\έ\s_v uLj$^p z樛+\iLu9RThA.ȩc3{[JavHAD.AHSQ[){LV @\T;'DYH"CgGc<`eDh(sx'K1y+uleBaW_*F3ED[)Q)^hHvX 6`z@@lȟ4n :DPW2SsbU`(P߈c35Mө?zz0r 6 2mRȋvA#cQi%OGz(%I~@=L]BPU.ڞ6ĒhnX59!, UPd9. xaL~b֑ c9"43D(Fh(!suC GMۭ4ΘqȷW5nLF\-0X99|T8pN>r@FJ?dlӷ}k5j挄Ռt9 xPM[b*֛gz ZDZ&ߊGsK{_Xq.b@]o@QFѽMG ?AYLxtcfхz&FБd=H,8o͆n˜G CL^Gi"UYXF?LWNY9HҝkeDMם0~iEG1Ur QZ2oVr}N1di^'ccF X)SKşa\_uݠ\ٽLM.Ge<+'nPS;Anwm@MAUNA'y,_ޖ,fll?!#${6GWStb}ꄚږ1Ohmd䗆(fJ^٢~nwޝZA6UoUA7#5\Ez+Bd@`(SM]ri5VkO

一个FIFO pipe的简单Java实现

类别: JAVA教程  评论数:0 总得分:0
 

是个5个抽屉的fifo pipe。仅实现了存取方法,可以做相应修改以满足不同的要求。

public class Pipe{
  String[] strContent = {\"\",\"\",\"\",\"\",\"\"} ;

  int[] intIndex = {1,2,3,4,5};

  public int setStrContent(String strLine) {
    for(int i=0;i<5;i++)
    {
      if(intIndex[i] == 0)
      {
        strContent[i] = strLine;
        intIndex[i] = 5;
        return 0;
      }
    }
    return -1;
  }

  public String getStrContent() {
    for (int i = 0; i < 5; i++) {
      intIndex[i]--;
      if (intIndex[i] == 0) {
        return strContent[i];
      }
    }
    return \"\";
  }

}





-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:

纯粹空间 softpure.com
Copyright © 2006-2012 暖阳制作 版权所有
承接程序设计 网页设计
QQ: 15242663 (隐身在线 拒绝闲聊)  Email: faisun@sina.com

 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛  

百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备06033747号