當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。