Example usage for org.apache.commons.net.ftp.parser MLSxEntryParser getInstance

List of usage examples for org.apache.commons.net.ftp.parser MLSxEntryParser getInstance

Introduction

In this page you can find the example usage for org.apache.commons.net.ftp.parser MLSxEntryParser getInstance.

Prototype

public static MLSxEntryParser getInstance() 

Source Link

Usage

From source file:com.atomicleopard.thundr.ftp.commons.FTPClient.java

/**
 * Initiate list parsing for MLSD listings.
 *
 * @param pathname/*from  w ww.  j  av  a 2 s  .co  m*/
 * @return the engine
 * @throws IOException
 */
private FTPListParseEngine initiateMListParsing(String pathname) throws IOException {
    Socket socket = _openDataConnection_(FTPCmd.MLSD, pathname);
    FTPListParseEngine engine = new FTPListParseEngine(MLSxEntryParser.getInstance());
    if (socket == null) {
        return engine;
    }

    try {
        engine.readServerList(socket.getInputStream(), getControlEncoding());
    } finally {
        Util.closeQuietly(socket);
        completePendingCommand();
    }
    return engine;
}