蝦米爬啊爬
-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問題
積分與排名
積分 - 17982
排名 - 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程序(1955)
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
蝦米
閱讀(296)
評論(0)
編輯
收藏
新用戶注冊
刷新評論列表
只有注冊用戶
登錄
后才能發表評論。
網站導航:
博客園
IT新聞
Chat2DB
C++博客
博問
管理
主站蜘蛛池模板:
霍州市
|
都昌县
|
凤城市
|
长兴县
|
扎鲁特旗
|
筠连县
|
惠水县
|
松滋市
|
东乡族自治县
|
土默特右旗
|
明水县
|
清水县
|
洛扎县
|
象州县
|
阜南县
|
玉溪市
|
靖江市
|
巴青县
|
绩溪县
|
江口县
|
新巴尔虎右旗
|
石屏县
|
朝阳区
|
杭州市
|
新津县
|
个旧市
|
喀喇
|
临漳县
|
诏安县
|
临清市
|
钟山县
|
会东县
|
锦屏县
|
甘德县
|
融水
|
凤冈县
|
恩平市
|
武汉市
|
尉氏县
|
巴彦县
|
合阳县
|