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)
@@ -161,18 +159,6 @@ public interface Sardine
161159 */
162160 List <DavResource > patch (String url , List <Element > addProps , List <QName > removeProps ) throws IOException ;
163161
164- /**
165- * Add or remove custom properties for a url using WebDAV <code>PROPPATCH</code>.
166- *
167- * @param url Path to the resource including protocol and hostname
168- * @param addProps Properties to add to resource. If a property already exists then its value is replaced.
169- * @param removeProps Properties to remove from resource. Specifying the removal of a property that does not exist is not an error.
170- * @param headers Additional HTTP headers to add to the request
171- * @return The patched resources from the response
172- * @throws IOException I/O error or HTTP response validation failure
173- */
174- List <DavResource > patch (String url , List <Element > addProps , List <QName > removeProps , Map <String , String > headers ) throws IOException ;
175-
176162 /**
177163 * Uses HTTP <code>GET</code> to download data from a server. The stream must be closed after reading.
178164 *
@@ -263,10 +249,11 @@ public interface Sardine
263249 *
264250 * @param url Path to the resource including protocol and hostname (must not point to a directory)
265251 * @param dataStream Input source
252+ * @param contentType MIME type to add to the HTTP request header
266253 * @param headers Additional HTTP headers to add to the request
267254 * @throws IOException I/O error or HTTP response validation failure
268255 */
269- void put (String url , InputStream dataStream , Map <String , String > headers ) throws IOException ;
256+ void put (String url , InputStream dataStream , String contentType , Map <String , String > headers ) throws IOException ;
270257
271258 /**
272259 * Uses <code>PUT</code> to upload file to a server with specific contentType.
@@ -299,15 +286,6 @@ public interface Sardine
299286 */
300287 void delete (String url ) throws IOException ;
301288
302- /**
303- * Delete a resource using HTTP <code>DELETE</code> at the specified url
304- *
305- * @param url Path to the resource including protocol and hostname
306- * @param headers Additional HTTP headers to add to the request
307- * @throws IOException I/O error or HTTP response validation failure
308- */
309- void delete (String url , Map <String , String > headers ) throws IOException ;
310-
311289 /**
312290 * Uses WebDAV <code>MKCOL</code> to create a directory at the specified url
313291 *
@@ -365,17 +343,6 @@ public interface Sardine
365343 */
366344 void copy (String sourceUrl , String destinationUrl , boolean overwrite ) throws IOException ;
367345
368- /**
369- * Copy a url from source to destination using WebDAV <code>COPY</code>.
370- *
371- * @param sourceUrl Path to the resource including protocol and hostname
372- * @param destinationUrl Path to the resource including protocol and hostname
373- * @param overwrite {@code true} to overwrite if the destination exists, {@code false} otherwise.
374- * @param headers Additional HTTP headers to add to the request
375- * @throws IOException I/O error or HTTP response validation failure
376- */
377- void copy (String sourceUrl , String destinationUrl , boolean overwrite , Map <String , String > headers ) throws IOException ;
378-
379346 /**
380347 * Performs a HTTP <code>HEAD</code> request to see if a resource exists or not.
381348 *
@@ -479,6 +446,8 @@ public interface Sardine
479446 */
480447 List <String > getPrincipalCollectionSet (String url ) throws IOException ;
481448
449+ void enableHttp2 ();
450+
482451 /**
483452 * <p>
484453 * Enables HTTP GZIP compression. If enabled, requests originating from Sardine
0 commit comments