I have a question with regards to printing the response from the PDP. In particular, I would like to print the encoded response from the PDP to a string buffer or even simpler, to a jTextArea within my Java program. From my understanding, the only output method of the result is to a OutputStream object.
Below is what i'm currently doing in my program. It works perfectly fine, but I would like to print the results somewhere else besides the console line.
ResponseCtx responseToPEP = pdp.evaluate(requestFromPEP);
responseToPEP.encode(System.out, new Indenter());
Thank you,
Gerald
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This isn't really an XACML issue. In Java you can create any number of output streams, so you should just create some kind that gets you data into the format you need. System.out goes to the console, as (usually) does System.err. You should check out the Stream and Reader interfaces in java.io for some existing utilities for converting to arrays, strings, files, etc.
seth
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seth,
I have a question with regards to printing the response from the PDP. In particular, I would like to print the encoded response from the PDP to a string buffer or even simpler, to a jTextArea within my Java program. From my understanding, the only output method of the result is to a OutputStream object.
Below is what i'm currently doing in my program. It works perfectly fine, but I would like to print the results somewhere else besides the console line.
ResponseCtx responseToPEP = pdp.evaluate(requestFromPEP);
responseToPEP.encode(System.out, new Indenter());
Thank you,
Gerald
This isn't really an XACML issue. In Java you can create any number of output streams, so you should just create some kind that gets you data into the format you need. System.out goes to the console, as (usually) does System.err. You should check out the Stream and Reader interfaces in java.io for some existing utilities for converting to arrays, strings, files, etc.
seth