Is there a way to get the file size on a TFTP server without downloading the file. I want an JAVA API for the same if available.
I tried TFTPClient, but it does not support.
Note: I am able to get the file size on local tftp server, but not on the remote tftp. For the local below code works:
DatagramSocket socket = new DatagramSocket();
SocketAddress sockAddr = new InetSocketAddress(address.getHostAddress(),
portNumber);
socket.connect(sockAddr);
File file = new File(fileName);
long fileSize = getFileSize(file);
if (fileSize > 0) {
return fileSize;
}