Java ネットワークプ ..
[2ch|▼Menu]
423:422
07/03/05 16:45:02
// 出力ストリーム
BufferedOutputStream buf = new BufferedOutputStream(socket.getOutputStream());
PrintStream out1 = new PrintStream(buf);
ChunkedOutputStream out = new ChunkedOutputStream(out1,2000);

// HTTP ヘッダ
String writeStr="";
writeStr += ("HTTP/1.1 200 OK\n");
writeStr += ("Connection: close\n");
writeStr += ("Transfer-Encoding: chunked\n");
writeStr += ("Content-Type: text/xml; charset=utf-8");
writeStr += ("\r\n\r\n");
buf.write(writeStr.getBytes());

// 入力ストリーム in から出力
writeStr="";
String inputLine;
while ((inputLine = in.readLine()) != null) {
writeStr += inputLine;
}
out.write(writeStr.getBytes());



次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4983日前に更新/153 KB
担当:undef