All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.schoolwow.util.module.query.resource.flow.OpenUrlInputStreamFlow Maven / Gradle / Ivy

The newest version!
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的输入流";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy