code: public void rotate(String photoId, int degrees) throws FlickrException {
          Map<String, Object> parameters = new HashMap<String, Object>();
          parameters.put("method", METHOD_ROTATE);
  
          parameters.put("photo_id", photoId);
          parameters.put("degrees", String.valueOf(degrees));
  
          Response response = transportAPI.post(transportAPI.getPath(), parameters, apiKey, sharedSecret);
          if (response.isError()) {
              throw new FlickrException(response.getErrorCode(), response.getErrorMessage());
          }
      }
docs: Rotate the specified photo. The only allowed values for degrees are 90, 180 and 270.
  
  @param photoId
  The photo ID
  @param degrees
  The degrees to rotate (90, 170 or 270)