cn.schoolwow.util.module.query.resource.flow.OpenUrlInputStreamFlow Maven / Gradle / Ivy
package cn.schoolwow.util.module.query.resource.flow;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import java.io.InputStream;
import java.net.URL;
public class OpenUrlInputStreamFlow implements BusinessFlow {
@Override
public void executeBusinessFlow(FlowContext flowContext) throws Exception {
URL url = (URL) flowContext.checkData("url");
InputStream inputStream = url.openStream();
flowContext.putReturnData("inputStream", inputStream);
}
@Override
public String name() {
return "打开url的输入流";
}
}