Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
commons-net-1.4.1.jar - Apache Commons Net
commons-net-1.4.1.jar is the JAR file for Apache Commons Net 1.4.1, which
implements the client side of many basic Internet protocols.
commons-net-1.4.1.jar is distributed as part of the commons-net-1.4.1.zip download file.
JAR File Size and Download Location:
JAR name: commons-net.jar, commons-net-1.4.1.jar Target JDK version: 1.4 Dependency: None File name: commons-net-1.4.1.jar File size: 180792 bytes Date modified: 03-Dec-2005 Download: Apache Commons Net
✍: FYIcenter.com
⏎ org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java
/* * Copyright 2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.net.ftp.parser; import java.text.ParseException; import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPFile; /** * @version $Id: OS400FTPEntryParser.java 155429 2005-02-26 13:13:04Z dirkv $ */ public class OS400FTPEntryParser extends ConfigurableFTPFileEntryParserImpl { private static final String DEFAULT_DATE_FORMAT = "yy/MM/dd HH:mm:ss"; //01/11/09 12:30:24 private static final String REGEX = "(\\S+)\\s+" // user + "(\\d+)\\s+" // size + "(\\S+)\\s+(\\S+)\\s+" // date stuff + "(\\*\\S+)\\s+" // *STMF/*DIR + "(\\S+/?)\\s*"; // filename /** * The default constructor for a OS400FTPEntryParser object. * * @exception IllegalArgumentException * Thrown if the regular expression is unparseable. Should not be seen * under normal conditions. It it is seen, this is a sign that * <code>REGEX</code> is not a valid regular expression. */ public OS400FTPEntryParser() { this(null); } /** * This constructor allows the creation of an OS400FTPEntryParser object * with something other than the default configuration. * * @param config The {@link FTPClientConfig configuration} object used to * configure this parser. * @exception IllegalArgumentException * Thrown if the regular expression is unparseable. Should not be seen * under normal conditions. It it is seen, this is a sign that * <code>REGEX</code> is not a valid regular expression. * @since 1.4 */ public OS400FTPEntryParser(FTPClientConfig config) { super(REGEX); configure(config); } public FTPFile parseFTPEntry(String entry) { FTPFile file = new FTPFile(); file.setRawListing(entry); int type; if (matches(entry)) { String usr = group(1); String filesize = group(2); String datestr = group(3)+" "+group(4); String typeStr = group(5); String name = group(6); try { file.setTimestamp(super.parseTimestamp(datestr)); } catch (ParseException e) { return null; // this is a parsing failure too. } if (typeStr.equalsIgnoreCase("*STMF")) { type = FTPFile.FILE_TYPE; } else if (typeStr.equalsIgnoreCase("*DIR")) { type = FTPFile.DIRECTORY_TYPE; } else { type = FTPFile.UNKNOWN_TYPE; } file.setType(type); file.setUser(usr); try { file.setSize(Long.parseLong(filesize)); } catch (NumberFormatException e) { // intentionally do nothing } if (name.endsWith("/")) { name = name.substring(0, name.length() - 1); } int pos = name.lastIndexOf('/'); if (pos > -1) { name = name.substring(pos + 1); } file.setName(name); return file; } return null; } /** * Defines a default configuration to be used when this class is * instantiated without a {@link FTPClientConfig FTPClientConfig} * parameter being specified. * @return the default configuration for this parser. */ protected FTPClientConfig getDefaultConfiguration() { return new FTPClientConfig( FTPClientConfig.SYST_OS400, DEFAULT_DATE_FORMAT, null, null, null, null); } }
⏎ org/apache/commons/net/ftp/parser/OS400FTPEntryParser.java
Or download all of them as a single archive file:
File name: commons-net-1.4.1-src.zip File size: 324370 bytes Release date: 2013-03-03 Download
⇒ Using commons-net.jar in Java Programs
⇐ What Is commons-net-ftp-2.0.jar
2015-06-03, 56455👍, 0💬
Popular Posts:
JDK 11 jdk.internal.vm.ci.jmod is the JMOD file for JDK 11 Internal VM CI module. JDK 11 Internal VM...
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...
How to show the XML parsing flow with sax\DocumentTracer.java provided in the Apache Xerces package?...
What is the sax\Writer.java provided in the Apache Xerces package? I have Apache Xerces 2.11.0 insta...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...