建造者模式(Builder Pattern)也叫做生成器模式,其定义如下:
Separate the construction of a complex object from its representation so that the same construction process can create different representations.
将一个复杂对象的构建与它的表示分离,使得同样的构建过程可以创建不同的表示.
设计模式之模版方法模式
模板方法模式的定义
定义一个操作中的算法的框架,而将一些步骤延迟到子类中。使得子类可以不改
变一个算法的结构即可重定义该算法的某些特定步骤
Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.Template
Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s
structure
设计模式之抽象工厂模式
Provide a interface for creating families of related or dependent objects without specifing their concrete classess.
我的翻译:提供一个接口用来定义一系列有共同相关性的或互相依赖的对象,但不用指定具体的实现类。
设计模式之工厂模式
Define an interface for creating an object, but let subclass decide which class to instantiate, Factory Method lets a class defer instantiation to subclass.
定义一个创建对象的接口,让子类决定实例化那一个类,工厂方法是一个类的实例化延迟到子类。
总有刁民要害朕之sun.net.ftp.FtpClient上传文件到FTP
之前在网上随便找了下面Java代码上传文件到FTP服务器,但是自从换了一个FTP服务器下面的代码就不好使了,上传也不报错,就是无法上传。但是会生成一个xxx.tmp文件在FTP上