当前位置: 首页>>代码示例>>Java>>正文


Java FTP.NON_PRINT_TEXT_FORMAT属性代码示例

本文整理汇总了Java中org.apache.commons.net.ftp.FTP.NON_PRINT_TEXT_FORMAT属性的典型用法代码示例。如果您正苦于以下问题:Java FTP.NON_PRINT_TEXT_FORMAT属性的具体用法?Java FTP.NON_PRINT_TEXT_FORMAT怎么用?Java FTP.NON_PRINT_TEXT_FORMAT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.commons.net.ftp.FTP的用法示例。


在下文中一共展示了FTP.NON_PRINT_TEXT_FORMAT属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: __initDefaults

private void __initDefaults()
{
    __passiveHost        = null;
    __passivePort        = -1;
    __fileType           = FTP.ASCII_FILE_TYPE;
    __fileFormat         = FTP.NON_PRINT_TEXT_FORMAT;
    __systemName         = null;
    __entryParser        = null;
}
 
开发者ID:yahoo,项目名称:anthelion,代码行数:9,代码来源:Client.java

示例2: setFileType

/***
 * Sets the file type to be transferred.  This should be one of 
 * <code> FTP.ASCII_FILE_TYPE </code>, <code> FTP.IMAGE_FILE_TYPE </code>,
 * etc.  The file type only needs to be set when you want to change the
 * type.  After changing it, the new type stays in effect until you change
 * it again.  The default file type is <code> FTP.ASCII_FILE_TYPE </code>
 * if this method is never called.
 * <p>
 * @param fileType The <code> _FILE_TYPE </code> constant indcating the
 *                 type of file.
 * @return True if successfully completed, false if not.
 * @exception FTPConnectionClosedException
 *      If the FTP server prematurely closes the connection as a result
 *      of the client being idle or some other reason causing the server
 *      to send FTP reply code 421.  This exception may be caught either
 *      as an IOException or independently as itself.
 * @exception IOException  If an I/O error occurs while either sending a
 *      command to the server or receiving a reply from the server.
 ***/
public boolean setFileType(int fileType) throws IOException
{
    if (FTPReply.isPositiveCompletion(type(fileType)))
    {
        __fileType = fileType;
        __fileFormat = FTP.NON_PRINT_TEXT_FORMAT;
        return true;
    }
    return false;
}
 
开发者ID:yahoo,项目名称:anthelion,代码行数:29,代码来源:Client.java


注:本文中的org.apache.commons.net.ftp.FTP.NON_PRINT_TEXT_FORMAT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。