77import java .util .List ;
88import java .util .Map ;
99import java .util .Set ;
10-
1110import javax .xml .namespace .QName ;
1211
13- import org .w3c .dom .Element ;
14-
1512import com .github .sardine .report .SardineReport ;
13+ import org .w3c .dom .Element ;
1614
1715/**
1816 * The main interface for Sardine operations.
@@ -27,15 +25,15 @@ public interface Sardine
2725 * @param username Use in authentication header credentials
2826 * @param password Use in authentication header credentials
2927 */
30- void setCredentials (String username , String password );
28+ void setCredentials (String username , char [] password );
3129
3230 /**
3331 * @param username Use in authentication header credentials
3432 * @param password Use in authentication header credentials
3533 * @param domain NTLM authentication
3634 * @param workstation NTLM authentication
3735 */
38- void setCredentials (String username , String password , String domain , String workstation );
36+ void setCredentials (String username , char [] password , String domain , String workstation );
3937
4038 /**
4139 * @see #list(String)
@@ -192,18 +190,6 @@ public interface Sardine
192190 */
193191 List <DavResource > patch (String url , List <Element > addProps , List <QName > removeProps ) throws IOException ;
194192
195- /**
196- * Add or remove custom properties for a url using WebDAV <code>PROPPATCH</code>.
197- *
198- * @param url Path to the resource including protocol and hostname
199- * @param addProps Properties to add to resource. If a property already exists then its value is replaced.
200- * @param removeProps Properties to remove from resource. Specifying the removal of a property that does not exist is not an error.
201- * @param headers Additional HTTP headers to add to the request
202- * @return The patched resources from the response
203- * @throws IOException I/O error or HTTP response validation failure
204- */
205- List <DavResource > patch (String url , List <Element > addProps , List <QName > removeProps , Map <String , String > headers ) throws IOException ;
206-
207193 /**
208194 * Uses HTTP <code>GET</code> to download data from a server. The stream must be closed after reading.
209195 *
@@ -305,10 +291,11 @@ public interface Sardine
305291 *
306292 * @param url Path to the resource including protocol and hostname (must not point to a directory)
307293 * @param dataStream Input source
294+ * @param contentType MIME type to add to the HTTP request header
308295 * @param headers Additional HTTP headers to add to the request
309296 * @throws IOException I/O error or HTTP response validation failure
310297 */
311- void put (String url , InputStream dataStream , Map <String , String > headers ) throws IOException ;
298+ void put (String url , InputStream dataStream , String contentType , Map <String , String > headers ) throws IOException ;
312299
313300 /**
314301 * Uses <code>PUT</code> to upload file to a server with specific contentType.
@@ -341,15 +328,6 @@ public interface Sardine
341328 */
342329 void delete (String url ) throws IOException ;
343330
344- /**
345- * Delete a resource using HTTP <code>DELETE</code> at the specified url
346- *
347- * @param url Path to the resource including protocol and hostname
348- * @param headers Additional HTTP headers to add to the request
349- * @throws IOException I/O error or HTTP response validation failure
350- */
351- void delete (String url , Map <String , String > headers ) throws IOException ;
352-
353331 /**
354332 * Uses WebDAV <code>MKCOL</code> to create a directory at the specified url
355333 *
@@ -407,17 +385,6 @@ public interface Sardine
407385 */
408386 void copy (String sourceUrl , String destinationUrl , boolean overwrite ) throws IOException ;
409387
410- /**
411- * Copy a url from source to destination using WebDAV <code>COPY</code>.
412- *
413- * @param sourceUrl Path to the resource including protocol and hostname
414- * @param destinationUrl Path to the resource including protocol and hostname
415- * @param overwrite {@code true} to overwrite if the destination exists, {@code false} otherwise.
416- * @param headers Additional HTTP headers to add to the request
417- * @throws IOException I/O error or HTTP response validation failure
418- */
419- void copy (String sourceUrl , String destinationUrl , boolean overwrite , Map <String , String > headers ) throws IOException ;
420-
421388 /**
422389 * Performs a HTTP <code>HEAD</code> request to see if a resource exists or not.
423390 *
@@ -548,6 +515,8 @@ public interface Sardine
548515 */
549516 List <String > getPrincipalCollectionSet (String url ) throws IOException ;
550517
518+ void enableHttp2 ();
519+
551520 /**
552521 * <p>
553522 * Enables HTTP GZIP compression. If enabled, requests originating from Sardine
0 commit comments