vedat demir created CAMEL-7325:
----------------------------------

             Summary: WrappedInputStream can not extends InputStream
                 Key: CAMEL-7325
                 URL: https://issues.apache.org/jira/browse/CAMEL-7325
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.12.3
            Reporter: vedat demir
            Priority: Minor


WrappedInputStream may take InputStream or ByteArrayInputStream in its 
construction and we use org.apache.camel.util.IOHelper class for stream 
operation. Please check the line 173 (in version 2.13.3) in IOHelper. You'll 
see there is a "if (input instanceof ByteArrayInputStream) {" statement to 
treat ByteArrayInputStream in a different way.  Since WrappedInputStream  
extends InputStream class rest of the API can not execute these parts and we 
may not be able to read the stream since we need to reset the 
ByteArrayInputStream before executing the "available()" method. 

I've attached two different converter to show the difference. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to