1 14 package org.wings.io; 15 16 import java.io.IOException ; 17 import java.io.OutputStream ; 18 19 25 public final class DeviceOutputStream extends OutputStream { 26 final Device sink; 27 28 public DeviceOutputStream(Device d) { 29 sink = d; 30 } 31 32 public void close() {} 33 34 public void flush() throws IOException { 35 sink.flush(); 36 } 37 38 public void write(byte b[], 39 int off, 40 int len) throws IOException { 41 sink.write(b, off, len); 42 } 43 44 public void write(byte b[]) throws IOException { 45 sink.write(b); 46 } 47 48 public void write(int b) throws IOException { 49 sink.write(b); 50 } 51 } 52 53 54 | Popular Tags |