蝦米爬啊爬
-xiami's blog
常用鏈接
我的隨筆
我的評論
我的參與
最新評論
留言簿
(4)
給我留言
查看公開留言
查看私人留言
隨筆檔案
(16)
2007年7月 (1)
2007年5月 (1)
2007年4月 (1)
2007年3月 (2)
2006年11月 (11)
相冊
xiami's photo
最新隨筆
1.?where 1=1(摘)
2.?String 轉 Date
3.?命名規則
4.?ajax(百度百科)
5.?名詞解釋(來源于百度百科)
6.?使用netbeans開發一個javabean程序
7.?建立一個螺旋形矩陣A[n][n]
8.?servlet-api的基本類和其接口介紹
9.?使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory
10.?JAVA連接MYSQL
11.?管道流通信
12.?用File類來列出和篩選所有文件
13.?java.util下的Class Collections的兩種sort方法使用
14.?靜態內部類
15.?1.5容器note問題
積分與排名
積分 - 17985
排名 - 1849
最新評論
1.?re: 使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory
評論內容較長,點擊標題查看
--rel
2.?re: 使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory
多半是只讀,改下子文件屬性,把只讀去掉
--老左zuoge85@gmail.com
3.?re: 使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory
看看你們那個文件目錄是不是只讀的
--老左zuoge85@gmail.com
4.?re: servlet-api的基本類和其接口介紹
東西很多但是很抽象,迷糊中...
--sophia
5.?re: 使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory
謝謝謝謝 我也這樣 終于找到答案了
--amber
閱讀排行榜
1.?使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory(5501)
2.?String 轉 Date(2687)
3.?java.util下的Class Collections的兩種sort方法使用(2179)
4.?使用netbeans開發一個javabean程序(1956)
5.?使用commons-fileupload包進行文件上傳(1003)
評論排行榜
1.?使用netbeans啟動捆綁tomcat出現某工程目錄does not exist or is not a readable directory(4)
2.?servlet-api的基本類和其接口介紹(1)
3.?where 1=1(摘)(0)
4.?String 轉 Date(0)
5.?命名規則(0)
Powered by:
博客園
模板提供:
滬江博客
BlogJava
|
首頁
|
發新隨筆
|
發新文章
|
聯系
|
聚合
|
管理
管道流通信
管道流通信
import
?java.io.PipedOutputStream;
import
?java.io.PipedInputStream;
public
?
class
?Main?
{
????
public
?Main()
{
????}
????
public
?
static
?
void
?main(String[]?args)??
throws
?Exception
{
????????PipedOutputStream?pos
=
new
?PipedOutputStream();
????????PipedInputStream?pis
=
new
?PipedInputStream();
????????pos.connect(pis);
????????producer?p
=
new
?producer(pos);
????????p.run();
????????consumer?c
=
new
?consumer(pis);
????????c.run();
????}
????
}
class
?producer?
extends
?Thread
{
????
private
?PipedOutputStream?pos;
????producer(PipedOutputStream?pos)
{
????????
this
.pos
=
pos;
????}
????
public
?
void
?run()
{
????????
try
{
????????????pos.write(
"
send?a?message
"
.getBytes());
????????????pos.close();
????????}
catch
(Exception?e)
{
????????????e.printStackTrace();
????????}
????}
}
class
?consumer?
extends
?Thread
{
????
private
?PipedInputStream?pis;
????consumer(PipedInputStream?pis)
{
????????
this
.pis
=
pis;
????}
????
public
?
void
?run()
{
????????
byte
?b[]
=
new
?
byte
[
100
];
????????
try
{
????????????
int
?len
=
pis.read(b);
????????????System.out.println(
new
?String(b,
0
,len));
????????}
catch
(Exception?e)
{
????????e.printStackTrace();
????????}
????????
????}
}
發表于 2006-11-24 13:34
蝦米
閱讀(297)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
主站蜘蛛池模板:
井陉县
|
固阳县
|
甘南县
|
云南省
|
泸溪县
|
萨迦县
|
海盐县
|
十堰市
|
孟津县
|
卓资县
|
景泰县
|
长沙县
|
普兰店市
|
改则县
|
桦南县
|
千阳县
|
衡水市
|
长顺县
|
海淀区
|
咸宁市
|
黄平县
|
甘肃省
|
屏东县
|
淳安县
|
栖霞市
|
柳江县
|
湛江市
|
新津县
|
合山市
|
京山县
|
桂东县
|
新建县
|
建阳市
|
双鸭山市
|
上饶市
|
长治县
|
恭城
|
乐业县
|
翁牛特旗
|
吉隆县
|
叙永县
|