private void readObject ( WebContext ctx , String bucketName , String objectId ) throws IOException { Bucket bucket = storage . getBucket ( bucketName ) ; String id = objectId . replace ( ' ' , ' ' ) ; String uploadId = ctx . get ( "uploadId" ) . asString ( ) ; if ( ! checkObjectRequest ( ctx , bucket , id ) ) { return ; } HttpMethod method = ctx . getRequest ( ) . method ( ) ; if ( HEAD == method ) { getObject ( ctx , bucket , id , false ) ; } else if ( GET == method ) { if ( Strings . isFilled ( uploadId ) ) { getPartList ( ctx , bucket , id , uploadId ) ; } else { getObject ( ctx , bucket , id , true ) ; } } else if ( DELETE == method ) { if ( Strings . isFilled ( uploadId ) ) { abortMultipartUpload ( ctx , uploadId ) ; } else { deleteObject ( ctx , bucket , id ) ; } } else { throw new IllegalArgumentException ( ctx . getRequest ( ) . method ( ) . name ( ) ) ; } }
Dispatching method handling all object specific calls which either read or delete the object but do not provide any data .