You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/03/23 10:06:25 UTC

[jira] [Resolved] (CAMEL-7325) WrappedInputStream can not extend InputStream

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

Claus Ibsen resolved CAMEL-7325.
--------------------------------
    Resolution: Not A Problem

> WrappedInputStream can not extend 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
>            Assignee: Willem Jiang
>            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.3.4#6332)