Commons VFS and IBM MVS System

Posted by Liming on Stack Overflow See other posts from Stack Overflow or by Liming
Published on 2010-05-05T12:47:40Z Indexed on 2010/05/26 14:21 UTC
Read the original article Hit count: 155

Filed under:
|
|
|
|

Hello All,

I'm using Apache Commons VFS / SFTP, we are trying to download files from the IBM MVS system.

The download part is all good, however, we can not open up the zipped files after downloading. Seems like the zip file was compressed using a different algorithm or something

Anyone has any pointers?

*Note, the same function works fine if we connect to a regular unix/linux SFTP server.

Below is an example of what we did

                    String defaultHost = "[my sftp ip address]";
                    String host = defaultHost;
                    String defaultRemotePath = "//__root.dir1.dir2.";
                    String remotePath = defaultRemotePath;
                    String user = "test";
                    String password = "test";
                    String remoteFileName = "Blah.ZIP.BLAH";

                    log.info("FtpPojo() begin instantiation");
                    FileObject localFileObject = fsManager.resolveFile("C:/Work/Blah.ZIP.BLAH");
                    log.debug("local file name is :"+localFileObject.getName().getBaseName());
                    log.debug("FtpPojo() instantiated and fsManager created");

                    String uri = createSftpUri(host, user, password) + ":322"+remotePath+remoteFileName;
                    remoteRepo = fsManager.resolveFile(uri, fsOptions);
                    remoteRepo.copyFrom(localFileObject, Selectors.SELECT_ALL);

© Stack Overflow or respective owner

Related posts about java

Related posts about unix