mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-06-18 04:51:54 +00:00
21 lines
585 B
Java
21 lines
585 B
Java
package net.i2p.servlet.util;
|
|
|
|
import java.io.IOException;
|
|
import java.io.OutputStream;
|
|
import java.io.Writer;
|
|
|
|
/**
|
|
* Treat a writer as an output stream. Quick 'n dirty, none
|
|
* of that "intarnasheeonaleyzayshun" stuff. So we can treat
|
|
* the jsp's PrintWriter as an OutputStream
|
|
*
|
|
* @since 0.9.33 consolidated from routerconsole and i2psnark
|
|
*/
|
|
public class WriterOutputStream extends OutputStream {
|
|
private final Writer _writer;
|
|
|
|
public WriterOutputStream(Writer writer) { _writer = writer; }
|
|
|
|
public void write(int b) throws IOException { _writer.write(b); }
|
|
}
|