org.mule.transport.sftp
Class SftpFileArchiveInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.FileInputStream
          extended by org.mule.transport.sftp.SftpFileArchiveInputStream
All Implemented Interfaces:
Closeable, ErrorOccurredDecorator

public class SftpFileArchiveInputStream
extends FileInputStream
implements ErrorOccurredDecorator

Ensures that the file is moved to the archiveFile folder after a successful consumption of the file

Author:
Magnus Larsson

Constructor Summary
SftpFileArchiveInputStream(File file)
           
SftpFileArchiveInputStream(File file, File archiveFile)
           
 
Method Summary
 void close()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] b, int off, int len)
           
 void setErrorOccurred()
           
 
Methods inherited from class java.io.FileInputStream
available, finalize, getChannel, getFD, skip
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SftpFileArchiveInputStream

public SftpFileArchiveInputStream(File file)
                           throws FileNotFoundException
Throws:
FileNotFoundException

SftpFileArchiveInputStream

public SftpFileArchiveInputStream(File file,
                                  File archiveFile)
                           throws FileNotFoundException
Throws:
FileNotFoundException
Method Detail

read

public int read()
         throws IOException
Overrides:
read in class FileInputStream
Throws:
IOException

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
Overrides:
read in class FileInputStream
Throws:
IOException

read

public int read(byte[] b)
         throws IOException
Overrides:
read in class FileInputStream
Throws:
IOException

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Overrides:
close in class FileInputStream
Throws:
IOException

setErrorOccurred

public void setErrorOccurred()
Specified by:
setErrorOccurred in interface ErrorOccurredDecorator


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.