Package org.guvnor.tools.utils.webdav

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.createResource()


                // Hack: When creating a file, if the actual contents are passed first,
                // the client hangs for about 20 seconds when closing the InputStream.
                // Don't know why...
                // But, if the file is created with empty contents, and then the contents
                // set, the operation is fast (less than a couple of seconds)
                res = client.createResource(fullPath, new ByteArrayInputStream(new byte[0]), false);
                if (res) {
                    client.putResource(fullPath, selectedFile.getContents());
                }
            } catch (WebDavException wde) {
                if (wde.getErrorCode() != IResponse.SC_UNAUTHORIZED) {
View Full Code Here


                boolean retry = PlatformUtils.getInstance().
                                    authenticateForServer(repLoc, client);
                if (retry) {
//                    res = client.createResource(fullPath, selectedFile.getContents(), false);
                    // See Hack note immediately above...
                    res = client.createResource(fullPath, new ByteArrayInputStream(new byte[0]), false);
                    if (res) {
                        client.putResource(fullPath, selectedFile.getContents());
                    }
                }
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.