private String putObject ( String bucketName , String objectName , int length , Object data , String uploadId , int partNumber , Map < String , String > headerMap ) throws InvalidBucketNameException , NoSuchAlgorithmException , InsufficientDataException , IOException , InvalidKeyException , NoResponseException , XmlPullParserException , ErrorResponseException , InternalException { HttpResponse response = null ; Map < String , String > queryParamMap = null ; if ( partNumber > 0 && uploadId != null && ! "" . equals ( uploadId ) ) { queryParamMap = new HashMap <> ( ) ; queryParamMap . put ( "partNumber" , Integer . toString ( partNumber ) ) ; queryParamMap . put ( UPLOAD_ID , uploadId ) ; } response = executePut ( bucketName , objectName , headerMap , queryParamMap , data , length ) ; response . body ( ) . close ( ) ; return response . header ( ) . etag ( ) ; }
Executes put object and returns ETag of the object .