put overloads accepting WriteLogic#194
Conversation
|
Formatting should be tabs, not spaces. Other than that, it looks good. |
|
Rats. I'll fix that. Pretty much every project I work on is the opposite. :) |
|
Shoot.. wrong issue for that last comment that I deleted... please ignore. =) |
|
I will note that I saw some other 4-space indents in SardineImpl. I fixed one of them which made the layout look particularly bad, but there are some other innocuous ones which might be worth doing in a separate commit. |
|
This should be handled outside of this library. See for example DAVWriteFeature. |
|
I took a look, but it isn't clear how I would solve this using their code as an example. They have the luxury of their data already being in a file, and I'm already using a temporary file to work around it today anyway, so it seems like there is nothing I can do to improve things. |
|
I ran into this as well -- I have an encryption function that reads an input stream and writes to an output stream, and I wanted to open a WebDAV connection for that output stream. But I can't, because it only accepts an input stream. So I either have to do it in memory or write to a temp file, neither of which is great for large objects. Or, I have to spin up a thread to pump bytes from one place to another, also not great. My other pluggable uploaders provide output streams -- file, S3, HTTP, etc. It seems to be the standard way of handling this sort of task in the wider JVM world. Would the maintainers be open to revisiting this? |
|
I agree that a stream based solution would be nicer. @dkocher? |
If I understand the requirement and I agree that would be nice is that the Sardine API should be extended to have an API for We have an awkward implementation of Maybe after upgrading the dependency 2. Footnotes |
Instead of using Consumer which is Java 8 only and also forbids throwing an exception, I introduced an interface which can be used with lambdas in Java 8 anyway, but which will still work in earlier versions.