Examples of transferToClient()


Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                        .getArgument());

                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));

                dataConnection.transferToClient(session.getFtpletSession(), directoryLister.listFiles(
                        parsedArg, session.getFileSystemView(), formater));
            } catch (SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
                failure = true;
                session.write(LocalizedFtpReply.translate(session, request, context,
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

            // transfer listing data
            boolean failure = false;
            String dirList = directoryLister.listFiles(parsedArg,
              session.getFileSystemView(), LIST_FILE_FORMATER);
            try {
                dataConnection.transferToClient(session.getFtpletSession(), dirList);
            } catch (SocketException ex) {
                LOG.debug("Socket exception during list transfer", ex);
                failure = true;
                session.write(LocalizedDataTransferFtpReply.translate(session, request, context,
                        FtpReply.REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED,
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                    formater = LIST_FILE_FORMATER;
                } else {
                    formater = NLST_FILE_FORMATER;
                }

                dataConnection.transferToClient(session.getFtpletSession(), directoryLister.listFiles(
                        parsedArg, session.getFileSystemView(), formater));
            } catch (SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
                failure = true;
                session.write(LocalizedFtpReply.translate(session, request, context,
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                // open streams
                is = openInputStream(session, file, skipLen);

                // transfer data
                transSz = dataConnection.transferToClient(session.getFtpletSession(), is);
                // attempt to close the input stream so that errors in
                // closing it will return an error to the client (FTPSERVER-119)
                if(is != null) {
                    is.close();
                }
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                // parse argument
                ListArgument parsedArg = ListArgumentParser.parse(request.getArgument());
               
                FileFormater formater = new MLSTFileFormater((String[])session.getAttribute("MLST.types"));
               
                dataConnection.transferToClient(directoryLister.listFiles(parsedArg, session.getFileSystemView(), formater));
            }
            catch(SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
                failure = true;
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED, "MLSD", null));
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

           
            try {
                // parse argument
                ListArgument parsedArg = ListArgumentParser.parse(request.getArgument());
               
                dataConnection.transferToClient(directoryLister.listFiles(parsedArg, session.getFileSystemView(), LIST_FILE_FORMATER));
            }
            catch(SocketException ex) {
                LOG.debug("Socket exception during list transfer", ex);
                failure = true;
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED, "LIST", null));
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                    formater = LIST_FILE_FORMATER;
                } else {
                    formater = NLST_FILE_FORMATER;
                }
               
                dataConnection.transferToClient(directoryLister.listFiles(parsedArg, session.getFileSystemView(), formater));
            }
            catch(SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
                failure = true;
                session.write(FtpReplyUtil.translate(session, request, context, FtpReply.REPLY_426_CONNECTION_CLOSED_TRANSFER_ABORTED, "NLST", null));
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

               
                // open streams
                is = openInputStream(session, file, skipLen);
               
                // transfer data
                long transSz = dataConnection.transferToClient(is);
               
                // log message
                String userName = session.getUser().getName();
                LOG.info("File download : " + userName + " - " + fileName);
               
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                // open streams
                is = openInputStream(session, file, skipLen);

                // transfer data
                long transSz = dataConnection.transferToClient(session.getFtpletSession(), is);
                // attempt to close the input stream so that errors in
                // closing it will return an error to the client (FTPSERVER-119)
                if(is != null) {
                    is.close();
                }
View Full Code Here

Examples of org.apache.ftpserver.ftplet.DataConnection.transferToClient()

                        .getArgument());

                FileFormater formater = new MLSTFileFormater((String[]) session
                        .getAttribute("MLST.types"));

                dataConnection.transferToClient(session.getFtpletSession(), directoryLister.listFiles(
                        parsedArg, session.getFileSystemView(), formater));
            } catch (SocketException ex) {
                LOG.debug("Socket exception during data transfer", ex);
                failure = true;
                session.write(LocalizedFtpReply.translate(session, request, context,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.