/** * No-arg constructor. * * @since 2.0 */ public EntityEnclosingMethod() { super(); setFollowRedirects(false); }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 */ public EntityEnclosingMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * No-arg constructor. * * @since 2.0 */ public EntityEnclosingMethod() { super(); setFollowRedirects(false); }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 */ public EntityEnclosingMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * No-arg constructor. * * @since 2.0 */ public EntityEnclosingMethod() { super(); setFollowRedirects(false); }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 */ public EntityEnclosingMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * No-arg constructor. * * @since 2.0 */ public EntityEnclosingMethod() { super(); setFollowRedirects(false); }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 */ public EntityEnclosingMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * No-arg constructor. * * @since 2.0 */ public EntityEnclosingMethod() { super(); setFollowRedirects(false); }
/** * Constructor specifying a URI. * * @param uri either an absolute or relative URI * * @since 2.0 */ public EntityEnclosingMethod(String uri) { super(uri); setFollowRedirects(false); }
/** * Execute the PUT method for the given path. * * @param path the server relative path to put the data * @param inputStream The input stream. * @throws IOException * @return true if the method is succeeded. */ public boolean putMethod( String path, InputStream inputStream, int contentLength ) throws IOException { setClient(); PutMethod method = new PutMethod( URIUtil.encodePathQuery( path ) ); method.setFollowRedirects( super.followRedirects ); generateIfHeader( method ); if ( getGetContentType() != null && !getGetContentType().equals( "" ) ) { method.setRequestHeader( "Content-Type", getGetContentType() ); } method.setRequestContentLength( contentLength ); method.setRequestBody( inputStream ); generateTransactionHeader( method ); generateAdditionalHeaders( method ); int statusCode = client.executeMethod( method ); setStatusCode( statusCode ); return isHttpSuccess( statusCode ); }