1 16 19 20 package org.apache.pluto.util; 21 22 import java.io.IOException ; 23 import java.io.OutputStream ; 24 import java.io.Writer ; 25 26 public class WriterOutputStream extends OutputStream  27 { 28 private Writer writer; 29 private String encoding; 30 31 public WriterOutputStream(Writer writer, String encoding) 32 { 33 this.writer = writer; 34 this.encoding = encoding; 35 } 36 37 public void write(int b) throws IOException { 38 writer.write(new String (new byte[] {(byte)b}, encoding)); 40 } 41 } 42 | Popular Tags |