[ 
https://issues.apache.org/jira/browse/CAMEL-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

vedat demir updated CAMEL-7325:
-------------------------------

    Attachment: MongoDBConverter.java

this one does not work since the inputstream is instance of InputStreamCache , 
which is and ByteArrayInputStream and WrappedInputStream suppresses this 
info....

> 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
>         Attachments: MongoDBConverter.java, MongoDBConverter.java
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> 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