Package org.apache.commons.net.tftp

Examples of org.apache.commons.net.tftp.TFTPWriteRequestPacket


            log.debug("Received packet: " + packet.getAddress() + ':' + packet.getPort());
        final int type = packet.getType();
        switch (type) {
            case TFTPPacket.WRITE_REQUEST:
                if (clientAddress == null) {
                    TFTPWriteRequestPacket wreqPacket = (TFTPWriteRequestPacket) packet;
                    File file = new File(".", wreqPacket.getFilename());
                    log.info("Request to write file " + wreqPacket.getFilename() + " (" +
                            file.getAbsolutePath() + ") received from " + packet.getAddress() +
                        ':' + packet.getPort());
                    fileOut = new FileOutputStream(file);
                    blockNumber = 0;
                    bufferedSend(new TFTPAckPacket(packet.getAddress(), packet.getPort(), blockNumber));
View Full Code Here

TOP

Related Classes of org.apache.commons.net.tftp.TFTPWriteRequestPacket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.