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
-
-
Constructor Details
-
FTP
public FTP()
-
-
Method Details
-
getResponseLength
public int getResponseLength() -
addResponse
-
getNextResponse
-
getLastResponse
-
connect
-
abort
public void abort() -
disconnect
-
addProgressListener
-
setLogging
public static void setLogging(boolean state) -
setLog
public static void setLog(int id) -
setPassiveMode
public void setPassiveMode(boolean mode) -
setBinary
-
setAscii
-
login
-
logout
-
cmd
-
get
-
get
- Throws:
Exception
-
getStart
- Throws:
Exception
-
get
-
getFinish
-
put
- Throws:
Exception
-
put
-
put
-
putStart
- Throws:
Exception
-
putFinish
-
cd
-
chmod
-
mkdir
-
rename
-
rm
-
rmdir
-
ls
-
pwd
-
createServerSocket
- Throws:
Exception
-
connectData
-
wait4Response
-
main
-