Java org.apache.commons.net.tftp TFTPClient fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.net.tftp TFTPClient fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.net.tftp TFTPClient.

The text is from its open source code.

Subclass

org.apache.commons.net.tftp.TFTPClient has subclasses.
Click this link to see all its subclasses.

Constructor

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.

Method

voidclose()
Closes the DatagramSocket used for the connection.
voidopen()
Opens a DatagramSocket on the local host at the first available port.
voidopen(int port)
Opens a DatagramSocket on the local host at a specified port.
intreceiveFile(String filename, int mode, OutputStream output, InetAddress host)
Same as calling receiveFile(filename, mode, output, host, TFTP.DEFAULT_PORT).
intreceiveFile(String filename, int mode, OutputStream output, String hostname)
Same as calling receiveFile(filename, mode, output, hostname, TFTP.DEFAULT_PORT).
intreceiveFile(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.
intreceiveFile(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.
voidsendFile(String filename, int mode, InputStream input, InetAddress host)
Same as calling sendFile(filename, mode, input, host, TFTP.DEFAULT_PORT).
voidsendFile(String filename, int mode, InputStream input, String hostname)
Same as calling sendFile(filename, mode, input, hostname, TFTP.DEFAULT_PORT).
voidsendFile(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.
voidsendFile(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.
voidsetDatagramSocketFactory(DatagramSocketFactory factory)
Sets the DatagramSocketFactory used by the DatagramSocketClient to open DatagramSockets.
voidsetDefaultTimeout(int timeout)
Set the default timeout in milliseconds to use when opening a socket.