Util: Consolidate two copies of WriterOutputStream into jetty-i2p.jar

This commit is contained in:
zzz
2017-12-18 12:45:04 +00:00
parent 71640590bc
commit be004cd350
4 changed files with 7 additions and 21 deletions

View File

@ -6,6 +6,7 @@ import java.util.Set;
import net.i2p.data.DataFormatException;
import net.i2p.data.Hash;
import net.i2p.router.web.HelperBase;
import net.i2p.servlet.util.WriterOutputStream;
/**
* Dump the peer profile data if given a full B64 peer string or prefix.

View File

@ -1,17 +0,0 @@
package net.i2p.router.web.helpers;
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
*/
public class WriterOutputStream extends OutputStream {
private Writer _writer;
public WriterOutputStream(Writer writer) { _writer = writer; }
public void write(int b) throws IOException { _writer.write(b); }
}