[Full]
完整版
[Rss]
訂閱
[Xml]
無圖版
[Xhtml]
無圖版
Rss
& SiteMap
曙海教育集團(tuán)論壇
http://www.bjzhda.cn
曙海教育集團(tuán)論壇
◎
曙海教育集團(tuán)論壇
→
JAVA語言開發(fā)
→
用java語言實現(xiàn)的迷你型的http服務(wù)器代碼
共1 條記錄, 每頁顯示 10 條, 頁簽:
[1]
[瀏覽完整版]
標(biāo)題:用java語言實現(xiàn)的迷你型的http服務(wù)器代碼
1樓
wangxinxin
發(fā)表于:2010-12-11 10:16:36
package
positron.harness;
import
java.io.BufferedReader;
import
java.io.ByteArrayInputStream;
import
java.io.File;
import
java.io.FileInputStream;
import
java.io.IOException;
import
java.io.InputStream;
import
java.io.InputStreamReader;
import
java.io.OutputStream;
import
java.io.PrintWriter;
import
java.io.UnsupportedEncodingException;
import
java.net.ServerSocket;
import
java.net.Socket;
import
java.net.URLEncoder;
import
java.util.Date;
import
java.util.Enumeration;
import
java.util.HashMap;
import
java.util.Locale;
import
java.util.Map;
import
java.util.Properties;
import
java.util.StringTokenizer;
import
java.util.TimeZone;
/**
* A simple, tiny, nicely embeddable HTTP 1.0 server in Java
*
* This class has been trivially modified from its original form, taken from
*
http://elonen.iki.fi/code/nanohttpd/NanoHTTPD.java
*
* <p> NanoHTTPD version 1.1,
* Copyright © 2001,2005-2007 Jarno Elonen (elonen@iki.fi,
http://iki.fi/elonen/
)
*
* <p><b>Features + limitations: </b><ul>
*
* <li> Only one Java file </li>
* <li> Java 1.1 compatible </li>
* <li> Released as open source, Modified BSD licence </li>
* <li> No fixed config files, logging, authorization etc. (Implement yourself if you need them.) </li>
* <li> Supports parameter parsing of GET and POST methods </li>
* <li> Supports both dynamic content and file serving </li>
* <li> Never caches anything </li>
* <li> Doesn't limit bandwidth, request time or simultaneous connections </li>
* <li> Default code serves files and shows all HTTP parameters and headers</li>
* <li> File server supports directory listing, index.html and index.htm </li>
* <li> File server does the 301 redirection trick for directories without '/'</li>
* <li> File server supports simple skipping for files (continue download) </li>
* <li> File server uses current directory as a web root </li>
* <li> File server serves also very long files without memory overhead </li>
* <li> Contains a built-in list of most common mime types </li>
* <li> All header names are converted lowercase so they don't vary between browsers/clients </li>
*
* </ul>
*
* <p><b>Ways to use: </b><ul>
*
* <li> Run as a standalone app, serves files from current directory and shows requests</li>
* <li> Subclass serve() and embed to your own program </li>
* <li> Call serveFile() from serve() with your own base directory </li>
*
* </ul>
*
* See the end of the source file for distribution license
* (Modified BSD licence)
*/
public
class
NanoHTTPD
{
//
==================================================
//
API parts
//
==================================================
/**
* Override this to customize the server.<p>
*
* (By default, this delegates to serveFile() and allows directory listing.)
*
* @parm uri Percent-decoded URI without parameters, for example "/index.cgi"
* @parm method "GET", "POST" etc.
共1 條記錄, 每頁顯示 10 條, 頁簽:
[1]
Copyright © 2000 - 2009
曙海
教育集團(tuán)
Powered By
曙海教育集團(tuán)
Version 2.2
Processed in .03125 s, 2 queries.
[Full]
完整版
[Rss]
訂閱
[Xml]
無圖版
[Xhtml]
無圖版
主站蜘蛛池模板:
337p人体韩国极品
|
亚洲人成伊人成综合网久久久
|
香港经典aa毛片免费观看变态
|
天天舔天天射天天干
|
久久精品噜噜噜成人av
|
欧美成人伊人十综合色
|
啊灬啊灬啊灬快灬性
|
高岭家の二轮花未增删
|
國产一二三内射在线看片
|
久久久久99精品成人片直播
|
最近中文字幕在线mv视频7
|
伊人久久大香线蕉亚洲
|
美女被爆羞羞网站在免费观看
|
国产精品久久久久一区二区
|
美女**毛片一级视频
|
国产特级毛片aaaaaa毛片
|
jazzjazz国产精品
|
性一交一乱一伦一色一情
|
久在线精品视频
|
欧美日韩在线成人
|
制服丝袜第五页
|
老司机午夜电影
|
国产成人精品美女在线
|
999国产精品
|
女人扒开腿让男生猛桶动漫
|
久久久久国色av免费观看
|
日韩高清电影在线观看
|
亚洲精品在线视频
|
精品久久久久成人码免费动漫
|
国产成人免费a在线视频app
|
91福利在线视频
|
在线观看xxx
|
中国国产高清一级毛片
|
无码人妻久久一区二区三区免费
|
日本理论片和搜子同居的日子演员
|
亚洲永久精品ww47
|
波多野结衣作品大全
|
国产人妖视频一区二区破除
|
香蕉精品视频在线观看
|
国产精品亚洲精品爽爽
|
99精品久久久中文字幕
|