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
  • 相关阅读:
    Web用户控件
    ASP.Net状态管理读书笔记--思维导图
    网站教学 提纲总结到ajax结束后面还有
    ajax文本空输入显示用户信息
    Ajax 下拉列表联动显示
    用Ajax删除的做法
    Findora:引入保密性和可审计的区块链
    角逐云计算的“新黄金十年”,谁将胜出?
    区块链世界的中心应该是什么?
    边缘计算2.0时代存在哪些挑战?
  • 原文地址:https://www.cnblogs.com/a00ium/p/10360186.html
Copyright © 2011-2022 走看看