01: /*
02: * Copyright 2000,2005 wingS development team.
03: *
04: * This file is part of wingS (http://wingsframework.org).
05: *
06: * wingS is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU Lesser General Public License
08: * as published by the Free Software Foundation; either version 2.1
09: * of the License, or (at your option) any later version.
10: *
11: * Please see COPYING for the complete licence.
12: */
13: package org.wings.io;
14:
15: import java.io.IOException;
16: import java.io.OutputStream;
17:
18: /**
19: * An OutputStream, that writes to an Device.
20: *
21: * @author <a href="mailto:H.Zeller@acm.org">Henner Zeller</a>
22: */
23: public final class DeviceOutputStream extends OutputStream {
24: final Device sink;
25:
26: public DeviceOutputStream(Device d) {
27: sink = d;
28: }
29:
30: public void close() {
31: }
32:
33: public void flush() throws IOException {
34: sink.flush();
35: }
36:
37: public void write(byte b[], int off, int len) throws IOException {
38: sink.write(b, off, len);
39: }
40:
41: public void write(byte b[]) throws IOException {
42: sink.write(b);
43: }
44:
45: public void write(int b) throws IOException {
46: sink.write(b);
47: }
48: }
|