public abstract class LocalHTTPServer extends Object
| Constructor and Description |
|---|
LocalHTTPServer()default constructor |
| Modifier and Type | Method and Description |
|---|---|
protected static String | _t(String key)Translate a message key using the proxy message bundle. |
protected static String | _t(String key,
Object o)Translate a message key with one parameter. |
protected static String | _t(String key,
Object o,
Object o2)Translate a message key with two parameters. |
static String | decode(String s)Decode percent-encoded (%xx) strings. |
static void | serveLocalFile(I2PAppContext context,
I2PSocketManager sockMgr,
OutputStream out,
String method,
String targetRequest,
String query,
String proxyNonce,
boolean allowGzip)Very simple web server. |
protected static String _t(String key)
key - the message key to translateprotected static String _t(String key, Object o)
key - the message key to translateo - the parameter to substitute for {0}protected static String _t(String key, Object o, Object o2)
key - the message key to translateo - the parameter to substitute for {0}o2 - the parameter to substitute for {1}public static String decode(String s)
s - the encoded stringpublic static void serveLocalFile(I2PAppContext context, I2PSocketManager sockMgr, OutputStream out, String method, String targetRequest, String query, String proxyNonce, boolean allowGzip) throws IOException
context - the I2P app contextsockMgr - only for /b32, otherwise ignoredout - the output streammethod - the HTTP methodtargetRequest - decoded path only, non-nullquery - raw (encoded), may be nullproxyNonce - the proxy nonceallowGzip - whether gzip is allowedIOException - if an I/O error occurs