|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.myjavaworld.ftp.FTPUtil
public class FTPUtil
An utility class
Field Summary | |
---|---|
static String[] |
MODES
Codes for modes. |
static String[] |
STRUCTURES
Codes for structures. |
static String[] |
TYPE_NAMES
Names for data representation types. |
static String[] |
TYPES
Codes for data representation types. |
Constructor Summary | |
---|---|
FTPUtil()
|
Method Summary | |
---|---|
static void |
close(Closeable closeable)
|
static void |
close(ServerSocket serverSocket)
|
static void |
close(Socket socket)
|
static String |
getMode(int mode)
Returns the mode code. |
static String |
getPortCommand(String ip,
int port)
|
static String |
getStructure(int structure)
Returns the structure code. |
static String |
getType(int type)
Returns the type code for a given type. |
static String |
parseAddress(String reply)
Extracts the host address from the reply of a PASV command. |
static String |
parseAttributes(String attributes)
|
static String |
parsePath(String reply)
Extracts the path from the given string. |
static int |
parsePort(String reply)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] TYPES
public static final String[] TYPE_NAMES
public static final String[] STRUCTURES
public static final String[] MODES
Constructor Detail |
---|
public FTPUtil()
Method Detail |
---|
public static String getType(int type)
type
- type constant as defined in FTPConstants.
public static String getStructure(int structure)
structure
- structure constant as defined in FTPConstants.
public static String getMode(int mode)
mode
- mode constant as defined in FTPConstants.
public static String parsePath(String reply)
reply
-
public static String parseAddress(String reply)
reply
- Reply of the PASV command
public static int parsePort(String reply)
reply
-
public static String getPortCommand(String ip, int port)
ip
- port
-
public static String parseAttributes(String attributes)
attributes
-
public static void close(Closeable closeable)
public static void close(Socket socket)
public static void close(ServerSocket serverSocket)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |