⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iftpservice.java

📁 一个实用工具类
💻 JAVA
字号:
/* * Copyright (C) butor.com. All rights reserved. * * This software is published under the terms of the GNU Library General * Public License (GNU LGPL), a copy of which has been included with this * distribution in the LICENSE.txt file.  */package org.butor.net.ftp.service;/** * ---------------------------------------------------------------- * 2001/01/23,AS: Creation * 2001/06/05,AS: Added getSocketToSotreFile() * 2001/06/06,AS: Correct name of getSocketToSotreFile() -> getSocketToSotreFile() * 2001/06/12,AS: Added changeDirectory(String, String) * 2001/06/20,AS: Added currentDirectory(String) */import java.net.Socket;import org.butor.net.ftp.IFTPInputStreamConsumer;/** * FTP service! * * @author Aiman Sawan   */public interface IFtpService {/** * Change Directory *  * @param sessionName, name of the ftp session to use * @param dir String, name of remote directory. */boolean changeDirectory(String sessionName, String dir);/** *  */boolean createDirectory(String sessionName, String dir);/** *  */String currentDirectory(String sessionName);/** *  */boolean existsDirectory(String sessionName, String dir);boolean fileExists(String sessionName, String file);/** * Gets Socket of stored file.  * The file will be created on remote and a socket on it will be returned to * makes writes on its output stream. * * @param remoteFile String, name of remote file to create. */Socket getSocketToStoreFile(String sessionName, String remoteFile);/** *  */boolean retrieveFile(String sessionName, String localFile, String remoteFile, char type);/** *  *//** * Philip Whitford * @param sessionName, name of the ftp session to use * @param file, the file name * @param reader, the implementation that will read the requested file * @param transferType, Ex ASCII_TRANSFER_MODE, BINARY_TRANSFER_MODE...etc */void retrieveFileToConsumer(String path, String sessionName, String file, char transferType, IFTPInputStreamConsumer inStreamConsumer);StringBuffer retrieveFileSB(String sessionName, String localFile);//pwStringBuffer retrieveFileSB(String sessionName, String localFile, char transferType);/** * @return a directory content list * * @param sessionName, name of the ftp session to use * @param dir, directory to list */String[] retrieveList(String sessionName, String dir, boolean detail);/** *  */boolean storeFile(String sessionName, String localFile, String remoteFile, char type);/** *  */boolean storeFileSB(String sessionName, StringBuffer buf, String remoteFile, char type);/** *  */StringBuffer unzipFileSB(String sessionName, String remoteFile);/** *  */boolean zipFileSB(String sessionName, StringBuffer buf, String remoteFile);/* * pw *   */boolean changeFilePermission(String sessionName, String permission, String fileName); boolean deleteFile(String sessionName, String remoteFile);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -