0

I am writing a Logging Interceptor to log response body for a Jersey Http Client. I have access to an object of type https://github.com/jersey/jersey/blob/master/core-common/src/main/java/org/glassfish/jersey/message/internal/CommittingOutputStream.java

But I don't see any toByteArray() kind of method to read the stream like in a ByteArrayOutputStream.

Hexy
  • 828
  • 14
  • 24
  • https://stackoverflow.com/a/36677808/2587435 – Paul Samsotha Dec 06 '20 at 03:33
  • my fault, this library has declared the CommitingOutputStream as final, hence impossible to extend. I can't think a reason to do so, while com.sun.jersey.api.client did declare the class as abstract, with an overrideable protected getOutputStream method. I just don't get the point of this. : S – aran Dec 07 '20 at 07:14

0 Answers0