Skip to Content
0
Former Member
Jul 20, 2011 at 02:09 PM

Methods to read a file?

15 Views

Hello,

I was wondering if there are any methods to directly read a file into the PI system. I have an installation where partners push files to a directory that is on my CI via SFTP and it appears the only way to access the files via the File Adapter is to either FTP back to ourselves, or use NFS. I was wondering if there were more "graceful" methods to bring the file and payload into the system which is more normal for Java, such as buffering, etc... to not overload memory.

For example:

File file = new File("/data/myfile.txt");

FileInputStream fis = null;

BufferedInputStream bis = null;

DataInputStream dis = null;

Any advice or recommendations is welcomed.

Thanks,

Mike