android下是使用jetty还是用i-jetty?如何嵌入到自己的项目中,如快传之类软件

笨蛋EGG 发布于 2015/05/01 10:49
阅读 2K+
收藏 2

【DevOps必读】产品经理与程序员之间如何破局?>>>

如现在流行的android软件,闪传、快传等等,都是通过jetty之类的东西,在手机上建立一个http服务器,电脑直接访问地址即可,达到文件传输的目的。

上网转了一圈,不知道在android项目下是用jetty还是i-jetty,

1、jetty更多是嵌入到eclipse中去使用,看了半天没看懂怎么嵌入到android项目中去使用。

2、再了解,又看到i-jetty,但是网上更多是讲如何编译i-jetty项目直接放到android中去,并不是我想要的嵌入到自己的android项目中去。

请教各位大神。

加载中
0
红薯官方
红薯官方

NanoHTTPD 我用这个在安卓上面做过视频传输。

这个东西就要自己写一些处理程序,类似于路由,然后调用业务处理。

它不支持Servlet,这些技术。

0
笨蛋EGG
笨蛋EGG

引用来自“Twisst”的评论

NanoHTTPD 我用这个在安卓上面做过视频传输。

这个东西就要自己写一些处理程序,类似于路由,然后调用业务处理。

它不支持Servlet,这些技术。

如果仅仅是传输我觉得倒是有很多方法可以,之前也是做过一个数据同步的小玩意儿。不过这次想要的效果的android上做服务器,电脑端啥都不用装,直接浏览器访问android,然后把传文件。不知道NanoHTTPD是否能实现?
0
红薯官方
红薯官方
/**
 * A simple, tiny, nicely embeddable HTTP server in Java
 * <p/>
 * <p/>
 * NanoHTTPD
 * <p>
 * </p>
 * Copyright (c) 2012-2013 by Paul S. Hawke, 2001,2005-2013 by Jarno Elonen,
 * 2010 by Konstantinos Togias</p>
 * <p/>
 * <p/>
 * <b>Features + limitations: </b>
 * <ul>
 * <p/>
 * <li>Only one Java file</li>
 * <li>Java 5 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 (+ rudimentary PUT
 * support in 1.25)</li>
 * <li>Supports both dynamic content and file serving</li>
 * <li>Supports file upload (since version 1.2, 2010)</li>
 * <li>Supports partial content (streaming)</li>
 * <li>Supports ETags</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 supports partial content (streaming)</li>
 * <li>File server supports ETags</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 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>
 * <p/>
 * </ul>
 * <p/>
 * <p/>
 * <b>How to use: </b>
 * <ul>
 * <p/>
 * <li>Subclass and implement serve() and embed to your own program</li>
 * <p/>
 * </ul>
 * <p/>
 * See the separate "LICENSE.md" file for the distribution license (Modified BSD
 * licence)

 */

我就搬过来

0
笨蛋EGG
笨蛋EGG

引用来自“Twisst”的评论

/**
 * A simple, tiny, nicely embeddable HTTP server in Java
 * <p/>
 * <p/>
 * NanoHTTPD
 * <p>
 * </p>
 * Copyright (c) 2012-2013 by Paul S. Hawke, 2001,2005-2013 by Jarno Elonen,
 * 2010 by Konstantinos Togias</p>
 * <p/>
 * <p/>
 * <b>Features + limitations: </b>
 * <ul>
 * <p/>
 * <li>Only one Java file</li>
 * <li>Java 5 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 (+ rudimentary PUT
 * support in 1.25)</li>
 * <li>Supports both dynamic content and file serving</li>
 * <li>Supports file upload (since version 1.2, 2010)</li>
 * <li>Supports partial content (streaming)</li>
 * <li>Supports ETags</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 supports partial content (streaming)</li>
 * <li>File server supports ETags</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 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>
 * <p/>
 * </ul>
 * <p/>
 * <p/>
 * <b>How to use: </b>
 * <ul>
 * <p/>
 * <li>Subclass and implement serve() and embed to your own program</li>
 * <p/>
 * </ul>
 * <p/>
 * See the separate "LICENSE.md" file for the distribution license (Modified BSD
 * licence)

 */

我就搬过来

好的,谢谢,我了解一下,看一下怎么用
0
红薯官方
红薯官方
* <b>How to use: </b>
 * <ul>
 * <p/>
 * <li>Subclass and implement serve() and embed to your own program</li>
 * <p/>
返回顶部
顶部