Java?????????????
???????????? ???????[ 2015/4/16 14:36:56 ] ????????Java ????? ?????
??????.???????????????????????????
????1 package ?????;
????2
????3 public class Client {
????4
????5 public static void main(String[] args) {
????6
????7 System.out.println("=======?????????");
????8 IBread normalBread = new NormalBread();
????9 normalBread = new SweetDecorator(normalBread);
????10 normalBread = new CornDecorator(normalBread);
????11 normalBread.process();
????12 System.out.println("=======??????????");
????13 }
????14 }
??????.???
????1 =======?????????
????2 ????????????????...
????3 ??????????????
????4 ?????????...
????5 ????...
????6 ?????...????????????ˉ??
????7 =======??????????
????????????е?4?????
????(1)??????????Component:???????????????????????????????????????????????IBread???
????(2)?????????????ConcreteComponent:????Component?????????????????籾???е?NormalBread
????(3)?????Decorator:?????????????Component??????????????????Component??????????籾????AbstractBread
????(4)????????ConcreteDecorator1??ConcreteDecorator2:??????λ????????籾???е?CornDecorator??
????JDK?е????????
????java.io?к??????????????
???????????:FilterInputStream???(???)??InputStream??????BufferedInputStream?????FilterInputStream??
????1???????????????:??????????InputStream
????2.?????????????ConcreteComponent??FileInputStream??FileOutputStream?????????
????3.?????Decorator:FilterInputStream???????InputStream????????????????InputStream????
????protected volatile InputStream in;
????protected FilterInputStream(InputStream in) {
????this.in = in;
????}
????4.????????:?? BufferedInputStream ???й?????????InputStream????????????
????public BufferedInputStream(InputStream in?? int size) {
????super(in);
????if (size <= 0) {
????throw new IllegalArgumentException("Buffer size <= 0");
????}
????buf = new byte[size];
????}
?????????????????????????????????????????????????????. (?????)
????1.InputStream-->IBread
????(??????InputStream??????????)
????2.FileInputStream-->NormalBread
????3.FilterInputStream-->AbstractBread
????(???Component????????InputStram.????????????????Component????????????????InputStream?????)
????4. BufferedInputStream --> CornDecorator
????(?????????:??????λ?????????I?????nputStream?????????)
????(BufferedInputStream ??super(in)??CornDecorator?е?kneadFlour()?????????super.kneadFlour();?????????IO??????????????? )
????????JDK?е????????
???????ü?з?????????????????(?????????????)
????1.??????????????????????????????????????????????CornDecorator???NormalBread ??SweetDecorator ???NormalBread ????????????????????????????????????????????????????"???????"??"?????".
????2.?????????????????????????????(?????????????????????????????)????????SweetDecorator??? NormalBread?????CornSweetDecorator ???ü?? CornDecorator ???????????????????.
????2.???????????μ???????????????????????????????????????????м仹???????У?????????????????????SweetDecorator??? NormalBread?????OnionSweetDecorator???SweetDecorator????????CornOnionSweetDecorator ???OnionSweetDecorator??
????????????????????????????????????????????γ?????????????
????4.???????????????????????????????????????У?????????SweetDecorator ???????輴???????Client???д????????????????
??????ó???
????1.??????????ж??????????μ????????????????????????????
????2.??????????????????仯??????????????????????????????仯????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????