Package javaforce
Class FTP
java.lang.Object
javaforce.FTP
- Direct Known Subclasses:
FTPS
FTP client class. Supports Passive and Active mode.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected BufferedReaderstatic booleanstatic booleanprotected Stringprotected InputStreamstatic intprotected OutputStreamprotected FTP.ReaderHolds the repsonse strings from the last executed commandprotected Socket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidaddProgressListener(FTP.ProgressListener progress) voidvoidvoidvoidbooleanprotected SocketconnectData(String host, int port) protected ServerSocketvoidvoidvoidget(String filename, OutputStream os) voidvoidintbooleanvoidlogout()static voidvoidvoidvoidput(InputStream is, String filename) voidvoidpwd()voidvoidvoidbooleansetAscii()booleanstatic voidsetLog(int id) static voidsetLogging(boolean state) voidsetPassiveMode(boolean mode) protected void
-
Field Details
-
s
-
is
-
os
-
br
-
host
-
active
protected boolean active -
reader
-
debug
public static boolean debug -
debug_log
public static boolean debug_log -
log
public static int log -
response
Holds the repsonse strings from the last executed command
-
-
Constructor Details
-
FTP
public FTP()
-
-
Method Details
-
getResponseLength
public int getResponseLength() -
addResponse
-
getNextResponse
-
getLastResponse
-
connect
- Throws:
Exception
-
abort
public void abort() -
disconnect
- Throws:
Exception
-
addProgressListener
-
setLogging
public static void setLogging(boolean state) -
setLog
public static void setLog(int id) -
setPassiveMode
public void setPassiveMode(boolean mode) -
setBinary
- Throws:
Exception
-
setAscii
- Throws:
Exception
-
login
- Throws:
Exception
-
logout
- Throws:
Exception
-
cmd
- Throws:
Exception
-
get
- Throws:
Exception
-
get
- Throws:
Exception
-
getStart
- Throws:
Exception
-
get
- Throws:
Exception
-
getFinish
- Throws:
Exception
-
put
- Throws:
Exception
-
put
- Throws:
Exception
-
put
- Throws:
Exception
-
putStart
- Throws:
Exception
-
putFinish
- Throws:
Exception
-
cd
- Throws:
Exception
-
chmod
- Throws:
Exception
-
mkdir
- Throws:
Exception
-
rename
- Throws:
Exception
-
rm
- Throws:
Exception
-
rmdir
- Throws:
Exception
-
ls
- Throws:
Exception
-
pwd
- Throws:
Exception
-
createServerSocket
- Throws:
Exception
-
connectData
- Throws:
Exception
-
wait4Response
- Throws:
Exception
-
main
-