在 Android 上使用 Webdav 暂停/恢复上传请求
我计划为 Android 构建一个 Webdav 客户端,但我不确定最好使用哪个库。基本上我想允许用户暂停和恢复对 Webdav 服务器的上传请求。有什么办法可以做到这一点吗?
我环顾四周,显然我已经在这些库之间做出了选择:
- Sardine
- JackRabbit
- Jakarta slip
Sardine 看起来是目前最稳定的解决方案。不过,我没有看到任何有关暂停和恢复请求的信息。
I'm planing to build a Webdav client for Android and I'm not sure what's the best library to use. Basically I would like to allow the user to pause and resume an upload request to a Webdav server. Is there any way to do that?
I' ve looked around and apparently I've got the choice between these libraries:
- Sardine
- JackRabbit
- Jakarta slide
Sardine looks like the most stable solution for now. I've seen nothing about pausing and resuming a request though.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我是《沙丁鱼》的原作者。我创建它是因为 Slide 和 Jackrabbit 太难使用并且没有得到很好的支持。 Sardine 的目的始终是在服务器上运行,而不是在移动设备上运行。此外,设计始终围绕着提出请求并获得响应。没有什么关于暂停的事情。我还听说在 Android 上运行可能会出现问题(依赖项)。
话虽如此,我不想这么说,但我认为你基本上只能靠自己了。如果您想加入 Sardine 项目并为其提供补丁以使其与 Android 兼容并支持暂停等功能,我很乐意加入您(假设您编写了良好的代码。呵呵)。
I'm the original author of Sardine. I created it because Slide and Jackrabbit were too difficult to use and not well supported. The intention of Sardine was always to be run on servers, not mobile devices. Also, the design has always been around making a request and getting a response. Nothing about pausing. I have also heard that there may be issues getting it working on Android (dependencies).
That said, I hate to say it, but I think you are pretty much on your own. If you'd like to join the Sardine project to contribute patches to it to make it compatible with Android and support features like pausing, I'd love to have you (assuming you write good code. hehe).
据我记得沙丁鱼与android不完全兼容(一些缺少依赖项)
关于你的问题,我不认为暂停/恢复是解析库的一部分(我基本上是沙丁鱼)。此行为与 HttpClient 更多相关。
然而我认为这对于它来说甚至是太低的抽象级别。
最好的解决方案是手动实现这种机制。不太漂亮,而且是AIO插座连接的
As far as i remember sardine is not fully compatible with android (some missing dependencies)
About your question, i don't think is pause/resume is a part of parsing lib (which sardine i basically is). This behavior is related more with HttpClient.
However i think this is even too low abstraction level for it.
The best solution would be to implement such mechanism by hand. It's not pretty, and is connected with AIO sockets