Example usage for Java org.apache.commons.net.tftp TFTPClient fields, constructors, methods, implement or subclass
The text is from its open source code.
TFTPClient() Creates a TFTPClient instance with a default timeout of DEFAULT_TIMEOUT, maximum timeouts value of DEFAULT_MAX_TIMEOUTS, a null socket, and buffered operations disabled. |
void | close() Closes the DatagramSocket used for the connection. |
void | open() Opens a DatagramSocket on the local host at the first available port. |
void | open(int port) Opens a DatagramSocket on the local host at a specified port. |
int | receiveFile(String filename, int mode, OutputStream output, InetAddress host) Same as calling receiveFile(filename, mode, output, host, TFTP.DEFAULT_PORT). |
int | receiveFile(String filename, int mode, OutputStream output, String hostname) Same as calling receiveFile(filename, mode, output, hostname, TFTP.DEFAULT_PORT). |
int | receiveFile(String filename, int mode, OutputStream output, InetAddress host, int port) Requests a named file from a remote host, writes the file to an OutputStream, closes the connection, and returns the number of bytes read. |
int | receiveFile(String filename, int mode, OutputStream output, String hostname, int port) Requests a named file from a remote host, writes the file to an OutputStream, closes the connection, and returns the number of bytes read. |
void | sendFile(String filename, int mode, InputStream input, InetAddress host) Same as calling sendFile(filename, mode, input, host, TFTP.DEFAULT_PORT). |
void | sendFile(String filename, int mode, InputStream input, String hostname) Same as calling sendFile(filename, mode, input, hostname, TFTP.DEFAULT_PORT). |
void | sendFile(String filename, int mode, InputStream input, InetAddress host, int port) Requests to send a file to a remote host, reads the file from an InputStream, sends the file to the remote host, and closes the connection. |
void | sendFile(String filename, int mode, InputStream input, String hostname, int port) Requests to send a file to a remote host, reads the file from an InputStream, sends the file to the remote host, and closes the connection. |
void | setDatagramSocketFactory(DatagramSocketFactory factory) Sets the DatagramSocketFactory used by the DatagramSocketClient to open DatagramSockets. |
void | setDefaultTimeout(int timeout) Set the default timeout in milliseconds to use when opening a socket. |