zoukankan      html  css  js  c++  java
  • Beanshell post processor写文件

    byte[] responseData = prev.getResponseData().;

    private String filePath = "F:/test.txt";

    BufferedOutputStream bos = null;

    FileOutputStream fos = null;

    File file = null;try

    {

    File file = new File(filePath);

    fos = new FileOutputStream(file, true);// 不添加参数true,以非追加的方式添加内容

    bos = new BufferedOutputStream(fos);

    bos.write(responseData);

    }catch(

    Exception e)

    {

    e.printStackTrace();

    }finally

    {

    if (bos != null) {

    try {

    bos.close();

    } catch (IOException e1) {

    e1.printStackTrace();

    }

    }

    if (fos != null) {

    try {

    fos.close();

    } catch (IOException e1) {

    e1.printStackTrace();

    }

    }

    }

     

        byte[] responseData = prev.getResponseData().;
        private String filePath = "F:/test.txt";
        BufferedOutputStream bos = null;
        FileOutputStream fos = null;
        File file = null;try
        {
            File file = new File(filePath);
            fos = new FileOutputStream(file, true);// 不添加参数true,以非追加的方式添加内容
            bos = new BufferedOutputStream(fos);
            bos.write(responseData);
        }catch(
        Exception e)
        {
            e.printStackTrace();
        }finally
        {
            if (bos != null) {
                try {
                    bos.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
            if (fos != null) {
                try {
                    fos.close();
                } catch (IOException e1) {
                    e1.printStackTrace();
                }
            }
        }
    View Code
  • 相关阅读:
    JZOJ 4043. 【雅礼集训2015Kzf】洪水
    JZOJ 5451.Genocide
    P4719 【模板】"动态 DP"&动态树分治
    [NOIP2018 提高组] 保卫王国
    【NOIP2017提高组正式赛】列队
    vuex的总结
    height:100vh
    从URL输入到页面展现到底发生什么
    JS的空数组是true还是false(内附JS类型转换表)
    Vue拼图验证组件使用教程
  • 原文地址:https://www.cnblogs.com/a00ium/p/10360186.html
Copyright © 2011-2022 走看看