package com.l7tech.external.assertions.gatewaymanagement.server.rest.resource.impl;

import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.util.IOUtils;
import jakarta.ws.rs.core.StreamingOutput;
import java.io.IOException;
import java.io.OutputStream;

class f implements StreamingOutput {
   final PolicyEnforcementContext val$context;

   f(PolicyBundleInstallerResource var1, PolicyEnforcementContext var2) {
      this.val$context = var2;
   }

   public void write(OutputStream var1) throws IOException {
      try {
         IOUtils.copyStream(this.val$context.getResponse().getMimeKnob().getEntireMessageBodyAsInputStream(), var1);
      } catch (NoSuchPartException var3) {
         throw new IOException(var3);
      }
   }
}
