ByteArrayOutputStream byteStream = ?????//Your input
byte[] bA = byteStream.toByteArray();
BufferedReader bReader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bA)));

解决方案 »

  1.   

    还是不太懂,如果这样:
    public  void catchOut(final OutputStream oS)throws IOException{
      
      //ByteArrayOutputStream byteStream =
        byte[] bA = byteStream.toByteArray();
      InputStreamReader iSR=new InputStreamReader(new ByteArrayInputStream(bA));
      final BufferedReader bR =new BufferedReader(iSR);
    }
    怎么写啊?
      

  2.   

    OutputStream 是一个虚类来的,你直接传过来的并不是OutputStream,你应该要知道这个oS是OutputStream 的哪一个子类,不过如果不是ByteArrayOutputStream的话,我也还没查出怎么做
      

  3.   

    Process process=Runtime.getRuntime().exec(command);
    catchOut(process.getOutputStream());