org.wings.io.DeviceOutputStream Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2000,2005 wingS development team.
*
* This file is part of wingS (http://wingsframework.org).
*
* wingS is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* Please see COPYING for the complete licence.
*/
package org.wings.io;
import java.io.IOException;
import java.io.OutputStream;
/**
* An OutputStream, that writes to an Device.
*
* @author Henner Zeller
*/
public final class DeviceOutputStream extends OutputStream {
final Device sink;
public DeviceOutputStream(Device d) {
sink = d;
}
@Override
public void close() {}
@Override
public void flush() throws IOException {
sink.flush();
}
@Override
public void write(byte b[],
int off,
int len) throws IOException {
sink.write(b, off, len);
}
@Override
public void write(byte b[]) throws IOException {
sink.write(b);
}
@Override
public void write(int b) throws IOException {
sink.write(b);
}
}