資源簡介
spydroid-ipcamera最新版源碼, spydroid-ipcamera支持Android H264硬件編碼。
代碼片段和文件信息
/*
?*?Copyright?(C)?2011-2012?GUIGUI?Simon?fyhertz@gmail.com
?*?
?*?This?file?is?part?of?Spydroid?(http://code.google.com/p/spydroid-ipcamera/)
?*?
?*?Spydroid?is?free?software;?you?can?redistribute?it?and/or?modify
?*?it?under?the?terms?of?the?GNU?General?Public?License?as?published?by
?*?the?Free?Software?Foundation;?either?version?3?of?the?License?or
?*?(at?your?option)?any?later?version.
?*?
?*?This?source?code?is?distributed?in?the?hope?that?it?will?be?useful
?*?but?WITHOUT?ANY?WARRANTY;?without?even?the?implied?warranty?of
?*?MERCHANTABILITY?or?FITNESS?FOR?A?PARTICULAR?PURPOSE.??See?the
?*?GNU?General?Public?License?for?more?details.
?*?
?*?You?should?have?received?a?copy?of?the?GNU?General?Public?License
?*?along?with?this?source?code;?if?not?write?to?the?Free?Software
?*?Foundation?Inc.?59?Temple?Place?Suite?330?Boston?MA??02111-1307??USA
?*/
package?net.majorkernelpanic.http;
import?static?net.majorkernelpanic.http.TinyHttpServer.TAG;
import?java.io.ByteArrayInputStream;
import?java.io.ByteArrayOutputStream;
import?java.io.FileInputStream;
import?java.io.FileNotFoundException;
import?java.io.IOException;
import?java.io.InputStream;
import?java.io.OutputStream;
import?java.io.OutputStreamWriter;
import?java.net.URLDecoder;
import?java.util.Date;
import?java.util.Locale;
import?org.apache.http.HttpEntity;
import?org.apache.http.HttpEntityEnclosingRequest;
import?org.apache.http.HttpException;
import?org.apache.http.HttpRequest;
import?org.apache.http.HttpResponse;
import?org.apache.http.HttpStatus;
import?org.apache.http.MethodNotSupportedException;
import?org.apache.http.entity.AbstractHttpEntity;
import?org.apache.http.entity.ContentProducer;
import?org.apache.http.entity.EntityTemplate;
import?org.apache.http.entity.InputStreamEntity;
import?org.apache.http.impl.cookie.DateParseException;
import?org.apache.http.impl.cookie.DateUtils;
import?org.apache.http.protocol.HttpContext;
import?org.apache.http.protocol.HttpRequestHandler;
import?org.apache.http.util.EntityUtils;
import?android.content.res.AssetFileDescriptor;
import?android.content.res.AssetManager;
import?android.util.Log;
/**
?*?
?*?Serves?the?content?of?assets/www?
?*
?*/
public?class?ModAssetServer?implements?HttpRequestHandler?{
public?static?final?String?PATTERN?=?“*“;
/**?The?list?of?MIME?Media?Types?supported?by?the?server.?*/
public?static?String[]?mimeMediaTypes?=?new?String[]?{
“htm“ “text/html“?
“html“ “text/html“?
“gif“ “image/gif“
“jpg“ “image/jpeg“
“png“ “image/png“?
“js“ “text/javascript“
“json“ “text/json“
“css“ “text/css“
};
private?final?TinyHttpServer?mServer;
private?final?AssetManager?mAssetManager;
public?ModAssetServer(TinyHttpServer?server)?{
super();
mServer?=?server;
mAssetManager?=?mServer.mContext.getAssets();
}
public?void?handle(
final?HttpRequest?request?
final?HttpResponse?response
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\
?????文件?????????530??2015-04-03?19:40??spydroid-ipcamera\.classpath
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\
?????文件??????????23??2015-04-03?19:40??spydroid-ipcamera\.git\HEAD
?????文件?????????334??2015-04-03?19:40??spydroid-ipcamera\.git\config
?????文件??????????73??2015-04-03?19:33??spydroid-ipcamera\.git\desc
?????目錄???????????0??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\
?????文件?????????452??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\applypatch-msg.sample
?????文件?????????896??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\commit-msg.sample
?????文件?????????189??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\post-update.sample
?????文件?????????398??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\pre-applypatch.sample
?????文件????????1642??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\pre-commit.sample
?????文件????????1352??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\pre-push.sample
?????文件????????4951??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\pre-reba
?????文件????????1239??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\prepare-commit-msg.sample
?????文件????????3611??2015-04-03?19:33??spydroid-ipcamera\.git\hooks\update.sample
?????文件???????13496??2015-04-03?19:40??spydroid-ipcamera\.git\index
?????目錄???????????0??2015-04-03?19:33??spydroid-ipcamera\.git\info\
?????文件?????????240??2015-04-03?19:33??spydroid-ipcamera\.git\info\exclude
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\logs\
?????文件?????????203??2015-04-03?19:40??spydroid-ipcamera\.git\logs\HEAD
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\heads\
?????文件?????????203??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\heads\master
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\remotes\
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\remotes\origin\
?????文件?????????203??2015-04-03?19:40??spydroid-ipcamera\.git\logs\refs\remotes\origin\HEAD
?????目錄???????????0??2015-04-03?19:33??spydroid-ipcamera\.git\ob
?????目錄???????????0??2015-04-03?19:41??spydroid-ipcamera\.git\ob
?????目錄???????????0??2015-04-03?19:40??spydroid-ipcamera\.git\ob
?????文件???????89832??2015-04-03?19:40??spydroid-ipcamera\.git\ob
............此處省略179個文件信息
評論
共有 條評論