camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Monisha <>
Subject Camel SFTP stream download
Date Tue, 24 Sep 2013 09:23:05 GMT
I have a camel route having SFTP location as the input endpoint. I have put
streamDownload=true in the input url. The files in my input location are

I am using the following code to create a bufferedReader from the
inputStream that I get from the exchange. (If I do a getClass() of the
inputStream, it gives a ChannelSftp$2).

    Reader decoder = null;
    BufferedReader bufferedReader;
    try {
      GzipInputStream zis = new GZIPInputStream(is);
      decoder = new InputStreamReader(zis, ASCII_ENCODING_CHARSET);
      bufferedReader = new BufferedReader(decoder);
    catch (Exception encodingEx) {"Exception: "+e);

Using this bufferedReader I read some part of the file. Now I again want to
read the file from the top. Mark and reset does not seem to work properly,
so I want to close and reopen this bufferedReader. But if I try to execute
the above code again, it throws EOFException.

Can you please help me with this issue?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message