|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jutil.TFTP
public final class TFTP
This is the TFTP utility code class. 17/08/2001 Removed UnknownUserException and InvalidPasswordExceptions to hide some details from any hacker. Replaced with GeneralSecurityException pb...
| Constructor Summary | |
|---|---|
TFTP()
Ensure that no one can create instances of this Class. |
|
| Method Summary | |
|---|---|
static void |
send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source)
Send a file to host in descriptor |
static void |
send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source,
boolean debug)
Send a file to host in descriptor |
static void |
send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source,
IOMonitor ioMonitor,
boolean debug)
Send a file to host in descriptor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TFTP()
| Method Detail |
|---|
public static final void send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source)
throws java.rmi.UnknownHostException,
java.security.GeneralSecurityException,
java.io.IOException
FTPFileDescriptor ftpFileDescriptor = FTPFileDescriptorFactory.create(
123.465.789.123, // host
"images", // destination dir
"myfile.txt", // dest filename
FTPConst.MODE_ASCII, // node FTPConst.MODE_ASCII / FTPConst.MODE_BINARY
true); // overwrite true/false
TFTP.send(ftpFileDescriptor, "myUserID", "myPass", new File("myfile.txt"));
java.rmi.UnknownHostException
java.security.GeneralSecurityException
java.io.IOException
public static final void send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source,
boolean debug)
throws java.rmi.UnknownHostException,
java.security.GeneralSecurityException,
java.io.IOException
FTPFileDescriptor ftpFileDescriptor = FTPFileDescriptorFactory.create(
123.465.789.123, // host
"images", // destination dir
"myfile.txt", // dest filename
FTPConst.MODE_ASCII, // node FTPConst.MODE_ASCII / FTPConst.MODE_BINARY
true); // overwrite true/false
TFTP.send(ftpFileDescriptor, "myUserID", "myPass", new File("myfile.txt"), debug);
java.rmi.UnknownHostException
java.security.GeneralSecurityException
java.io.IOException
public static final void send(FTPFileDescriptor ftpFileDescriptor,
java.lang.String user,
java.lang.String pass,
java.io.File source,
IOMonitor ioMonitor,
boolean debug)
throws java.rmi.UnknownHostException,
java.security.GeneralSecurityException,
java.io.IOException
FTPFileDescriptor ftpFileDescriptor = FTPFileDescriptorFactory.create(
123.465.789.123, // host
"images", // destination dir
"myfile.txt", // dest filename
FTPConst.MODE_ASCII, // node FTPConst.MODE_ASCII / FTPConst.MODE_BINARY
true); // overwrite true/false
TFTP.send(ftpFileDescriptor, "myUserID", "myPass", new File("myfile.txt"), new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))), debug);
java.rmi.UnknownHostException
java.security.GeneralSecurityException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||