List of usage examples for org.apache.commons.net.tftp.tftpserver TFTPServer setLog
public void setLog(PrintStream log)
From source file:com.thesmartguild.firmloader.lib.tftp.TFTPServerFactory.java
public static TFTPServer instantiate(File file) { try {/* w ww .j a v a2 s.c o m*/ TFTPServer TFTPServer_; Path tmpFilePath = TFTPServerFactory.createTempDirectory(); Path filePath = Files.copy(file.toPath(), Paths.get(tmpFilePath.toString(), file.getName()), StandardCopyOption.REPLACE_EXISTING); filePath.toFile().deleteOnExit(); TFTPServer_ = new TFTPServer(tmpFilePath.toFile(), tmpFilePath.toFile(), ServerMode.GET_ONLY); TFTPServer_.setLog(System.out); TFTPServer_.setLogError(System.out); return TFTPServer_; } catch (IOException e) { e.printStackTrace(); return null; } }