本文整理汇总了Java中org.apache.commons.net.io.Util类的典型用法代码示例。如果您正苦于以下问题:Java Util类的具体用法?Java Util怎么用?Java Util使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Util类属于org.apache.commons.net.io包,在下文中一共展示了Util类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initiateListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* private method through which all listFiles() and
* initiateListParsing methods pass once a parser is determined.
*
* @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 java.io.IOException
* If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
* @see FTPListParseEngine
*/
private FTPListParseEngine initiateListParsing(
FTPFileEntryParser parser, String pathname)
throws IOException
{
Socket socket = _openDataConnection_(FTPCmd.LIST, getListArguments(pathname));
FTPListParseEngine engine = new FTPListParseEngine(parser);
if (socket == null)
{
return engine;
}
try {
engine.readServerList(socket.getInputStream(), getControlEncoding());
}
finally {
Util.closeQuietly(socket);
}
completePendingCommand();
return engine;
}
开发者ID:archos-sa,项目名称:aos-FileCoreLibrary,代码行数:37,代码来源:FTPClient.java
示例2: initiateMListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* Initiate list parsing for MLSD listings.
*
* @param pathname
* @return the engine
* @throws java.io.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;
}
开发者ID:archos-sa,项目名称:aos-FileCoreLibrary,代码行数:26,代码来源:FTPClient.java
示例3: __initDefaults
import org.apache.commons.net.io.Util; //导入依赖的package包/类
private void __initDefaults()
{
__dataConnectionMode = ACTIVE_LOCAL_DATA_CONNECTION_MODE;
__passiveHost = null;
__passivePort = -1;
__activeExternalHost = null;
__reportActiveExternalHost = null;
__activeMinPort = 0;
__activeMaxPort = 0;
__fileType = FTP.ASCII_FILE_TYPE;
__fileStructure = FTP.FILE_STRUCTURE;
__fileFormat = FTP.NON_PRINT_TEXT_FORMAT;
__fileTransferMode = FTP.STREAM_TRANSFER_MODE;
__restartOffset = 0;
__systemName = null;
__entryParser = null;
__entryParserKey = "";
__bufferSize = Util.DEFAULT_COPY_BUFFER_SIZE;
__featuresMap = null;
}
开发者ID:kmarius,项目名称:xdman,代码行数:21,代码来源:FTPClient.java
示例4: initiateListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* private method through which all listFiles() and
* initiateListParsing methods pass once a parser is determined.
*
* @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.
* @see FTPListParseEngine
*/
private FTPListParseEngine initiateListParsing(
FTPFileEntryParser parser, String pathname)
throws IOException
{
Socket socket = _openDataConnection_(FTPCommand.LIST, getListArguments(pathname));
FTPListParseEngine engine = new FTPListParseEngine(parser);
if (socket == null)
{
return engine;
}
try {
engine.readServerList(socket.getInputStream(), getControlEncoding());
}
finally {
Util.closeQuietly(socket);
}
completePendingCommand();
return engine;
}
开发者ID:kmarius,项目名称:xdman,代码行数:37,代码来源:FTPClient.java
示例5: initiateMListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* Initiate list parsing for MLSD listings.
*
* @param pathname
* @return the engine
* @throws IOException
*/
private FTPListParseEngine initiateMListParsing(String pathname) throws IOException
{
Socket socket = _openDataConnection_(FTPCommand.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;
}
开发者ID:kmarius,项目名称:xdman,代码行数:26,代码来源:FTPClient.java
示例6: initiateListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
private FTPListParseEngine initiateListParsing(FTPFileEntryParser parser, String pathname) throws IOException {
Socket socket = this._openDataConnection_(26, this.getListArguments(pathname));
FTPListParseEngine engine = new FTPListParseEngine(parser);
if(socket == null) {
return engine;
} else {
try {
engine.readServerList(socket.getInputStream(), this.getControlEncoding());
} finally {
Util.closeQuietly(socket);
}
this.completePendingCommand();
return engine;
}
}
开发者ID:Bolt-Thrower,项目名称:xdm,代码行数:17,代码来源:FTPClient.java
示例7: initiateMListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
private FTPListParseEngine initiateMListParsing(String pathname) throws IOException {
Socket socket = this._openDataConnection_(38, pathname);
FTPListParseEngine engine = new FTPListParseEngine(MLSxEntryParser.getInstance());
if(socket == null) {
return engine;
} else {
try {
engine.readServerList(socket.getInputStream(), this.getControlEncoding());
} finally {
Util.closeQuietly(socket);
this.completePendingCommand();
}
return engine;
}
}
开发者ID:Bolt-Thrower,项目名称:xdm,代码行数:17,代码来源:FTPClient.java
示例8: initiateListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* private method through which all listFiles() and
* initiateListParsing methods pass once a parser is determined.
*
* @throws 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.
* @throws IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
* @see FTPListParseEngine
*/
private FTPListParseEngine initiateListParsing(FTPFileEntryParser parser, String pathname)
throws IOException {
Socket socket = _openDataConnection_(FTPCmd.LIST, getListArguments(pathname));
FTPListParseEngine engine = new FTPListParseEngine(parser, __configuration);
if (socket == null) {
return engine;
}
try {
engine.readServerList(socket.getInputStream(), getControlEncoding());
} finally {
Util.closeQuietly(socket);
}
completePendingCommand();
return engine;
}
开发者ID:AriaLyy,项目名称:Aria,代码行数:32,代码来源:FTPClient.java
示例9: initiateMListParsing
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* Initiate list parsing for MLSD listings.
*
* @return the engine
* @throws IOException
*/
private FTPListParseEngine initiateMListParsing(String pathname) throws IOException {
Socket socket = _openDataConnection_(FTPCmd.MLSD, pathname);
FTPListParseEngine engine =
new FTPListParseEngine(MLSxEntryParser.getInstance(), __configuration);
if (socket == null) {
return engine;
}
try {
engine.readServerList(socket.getInputStream(), getControlEncoding());
} finally {
Util.closeQuietly(socket);
completePendingCommand();
}
return engine;
}
开发者ID:AriaLyy,项目名称:Aria,代码行数:23,代码来源:FTPClient.java
示例10: loadStore
import org.apache.commons.net.io.Util; //导入依赖的package包/类
private static KeyStore loadStore(String storeType, File storePath, String storePass)
throws KeyStoreException, IOException, GeneralSecurityException {
KeyStore ks = KeyStore.getInstance(storeType);
FileInputStream stream = null;
try {
stream = new FileInputStream(storePath);
ks.load(stream, storePass.toCharArray());
} finally {
Util.closeQuietly(stream);
}
return ks;
}
开发者ID:AriaLyy,项目名称:Aria,代码行数:13,代码来源:KeyManagerUtils.java
示例11: loadStore
import org.apache.commons.net.io.Util; //导入依赖的package包/类
private static KeyStore loadStore(String storeType, File storePath, String storePass)
throws KeyStoreException, IOException, GeneralSecurityException {
KeyStore ks = KeyStore.getInstance(storeType);
FileInputStream stream = null;
try {
stream = new FileInputStream(storePath);
ks.load(stream, storePass.toCharArray());
} finally {
Util.closeQuietly(stream);
}
return ks;
}
开发者ID:rayanmestiri,项目名称:android-chat-telnet,代码行数:13,代码来源:KeyManagerUtils.java
示例12: getDefaultedBufferSize
import org.apache.commons.net.io.Util; //导入依赖的package包/类
/**
* Get the buffer size, with default set to Util.DEFAULT_COPY_BUFFER_SIZE.
* @return the buffer size.
*/
private int getDefaultedBufferSize() {
return __bufferSize > 0 ? __bufferSize : Util.DEFAULT_COPY_BUFFER_SIZE;
}
开发者ID:kmarius,项目名称:xdman,代码行数:8,代码来源:FTPClient.java
注:本文中的org.apache.commons.net.io.Util类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论