📄 ftpcontext.java
字号:
/*
* Version 0.70 01/04/2002
*
* Visit my url for update: http://www.geocities.com/beapetrovicova/
*
* jFtp was developed by Bea Petrovicova <beapetrovicova@yahoo.com>.
* The design and implementation of jFtp are available for royalty-free
* adoption and use. This software is provided 'as is' without any
* guarantees. Copyright is retained by Bea Petrovicova. Redistribution
* of any part of jFtp or any derivative works must include this notice.
*
*/
package cz.dhl.ftp;
import cz.dhl.ui.CoConsole;
import java.io.IOException;
/**
* Maintains FTP client settings & context.
*
* @Version 0.70 01/04/2002
* @author Bea Petrovicova <beapetrovicova@yahoo.com>
* @see Ftp
*/
public class FtpContext extends FtpSetting
{
private String textfilter[] = {".TXT",
".HTM", ".HTML", ".SHTML",
".CSS", ".JS", ".PL", ".PHP",
".H", ".C", ".HPP", ".CPP", ".JAVA",
".SQL", ".4GL",
".BAT", ".SH", ".AWK"};
private CoConsole console = new CoConsole()
{ public void print(String message)
{ timcam.FrameContainer.mainFrame.ftpOutput.setText(timcam.FrameContainer.mainFrame.ftpOutput.getText() + message + "\n"); } };
FtpContext() {}
/** Sets array of strings representing text-file extensions.
* @param textfilter must be array of uppercase strings with a leading '.' sign;
* example: { ".TXT", ".HTM", ".HTML", etc ... };
default settings is quite flexible */
public void setTextFilter(String textfilter[])
{ this.textfilter= textfilter; }
/** Sets array of strings representing text-file extensions.
* @return array of uppercase strings with a leading '.' sign;
* example: { ".TXT", ".HTM", ".HTML", etc ... } */
public String[] getTextFilter()
{ return textfilter; }
/** Sets output console.
* @see cz.dhl.ui.CoConsole */
synchronized public void setConsole(CoConsole console)
{ this.console = console; }
/** Gets output console.
* @see cz.dhl.ui.CoConsole */
synchronized public CoConsole getConsole()
{ return console; }
/** Prints message line to output console. */
public synchronized void printlog(String message)
{ if(console != null)
console.print(message);
}
/** Prints object to standard output. */
public void printerr(Exception exception)
{
timcam.FrameContainer.mainFrame.ftpOutput.setText(timcam.FrameContainer.mainFrame.ftpOutput.getText() + "Thread: " + Thread.currentThread().getName() + "\n" + "Exception: " + exception.getMessage() + "\n");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -