id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
100,600 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/ThreadedServer.java | ThreadedServer.stopJob | protected void stopJob(Thread thread, Object job)
{
if (job instanceof Socket)
{
try
{
((Socket) job).close();
}
catch (Exception e)
{
LogSupport.ignore(log, e);
}
}
super.stopJob(... | java | protected void stopJob(Thread thread, Object job)
{
if (job instanceof Socket)
{
try
{
((Socket) job).close();
}
catch (Exception e)
{
LogSupport.ignore(log, e);
}
}
super.stopJob(... | [
"protected",
"void",
"stopJob",
"(",
"Thread",
"thread",
",",
"Object",
"job",
")",
"{",
"if",
"(",
"job",
"instanceof",
"Socket",
")",
"{",
"try",
"{",
"(",
"(",
"Socket",
")",
"job",
")",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"Exception... | Kill a job. This method closes IDLE and socket associated with a job
@param thread
@param job | [
"Kill",
"a",
"job",
".",
"This",
"method",
"closes",
"IDLE",
"and",
"socket",
"associated",
"with",
"a",
"job"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/ThreadedServer.java#L591-L605 |
100,601 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java | MultiMap.getValue | public Object getValue(Object name,int i)
{
Object l=super.get(name);
if (i==0 && LazyList.size(l)==0)
return null;
return LazyList.get(l,i);
} | java | public Object getValue(Object name,int i)
{
Object l=super.get(name);
if (i==0 && LazyList.size(l)==0)
return null;
return LazyList.get(l,i);
} | [
"public",
"Object",
"getValue",
"(",
"Object",
"name",
",",
"int",
"i",
")",
"{",
"Object",
"l",
"=",
"super",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"i",
"==",
"0",
"&&",
"LazyList",
".",
"size",
"(",
"l",
")",
"==",
"0",
")",
"return",... | Get a value from a multiple value.
If the value is not a multivalue, then index 0 retrieves the
value or null.
@param name The entry key.
@param i Index of element to get.
@return Unmodifieable List of values. | [
"Get",
"a",
"value",
"from",
"a",
"multiple",
"value",
".",
"If",
"the",
"value",
"is",
"not",
"a",
"multivalue",
"then",
"index",
"0",
"retrieves",
"the",
"value",
"or",
"null",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java#L77-L83 |
100,602 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java | MultiMap.put | public Object put(Object name, Object value)
{
return super.put(name,LazyList.add(null,value));
} | java | public Object put(Object name, Object value)
{
return super.put(name,LazyList.add(null,value));
} | [
"public",
"Object",
"put",
"(",
"Object",
"name",
",",
"Object",
"value",
")",
"{",
"return",
"super",
".",
"put",
"(",
"name",
",",
"LazyList",
".",
"add",
"(",
"null",
",",
"value",
")",
")",
";",
"}"
] | Put and entry into the map.
@param name The entry key.
@param value The entry value.
@return The previous value or null. | [
"Put",
"and",
"entry",
"into",
"the",
"map",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java#L145-L148 |
100,603 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java | MultiMap.putAll | public void putAll(Map m)
{
Iterator i = m.entrySet().iterator();
boolean multi=m instanceof MultiMap;
while(i.hasNext())
{
Map.Entry entry =
(Map.Entry)i.next();
if (multi)
super.put(entry.getKey(),LazyList.clone(entry.getValue... | java | public void putAll(Map m)
{
Iterator i = m.entrySet().iterator();
boolean multi=m instanceof MultiMap;
while(i.hasNext())
{
Map.Entry entry =
(Map.Entry)i.next();
if (multi)
super.put(entry.getKey(),LazyList.clone(entry.getValue... | [
"public",
"void",
"putAll",
"(",
"Map",
"m",
")",
"{",
"Iterator",
"i",
"=",
"m",
".",
"entrySet",
"(",
")",
".",
"iterator",
"(",
")",
";",
"boolean",
"multi",
"=",
"m",
"instanceof",
"MultiMap",
";",
"while",
"(",
"i",
".",
"hasNext",
"(",
")",
... | Put all contents of map.
@param m Map | [
"Put",
"all",
"contents",
"of",
"map",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/MultiMap.java#L247-L260 |
100,604 | webmetrics/browsermob-proxy | src/main/java/org/xbill/DNS/security/DSASignature.java | DSASignature.fromDNS | public static byte []
fromDNS(byte [] sig) {
final int len = 20;
int n = 0;
byte rlen, slen, seqlen;
rlen = len;
if (sig[1] < 0)
rlen++;
slen = len;
if (sig[len + 1] < 0)
slen++;
/* 4 = 2 * (INT, value) */
seqlen = (byte) (rlen + slen + 4);
/* 2 = 1 * (SEQ, value) */
byte [] array = new byte[seqlen +... | java | public static byte []
fromDNS(byte [] sig) {
final int len = 20;
int n = 0;
byte rlen, slen, seqlen;
rlen = len;
if (sig[1] < 0)
rlen++;
slen = len;
if (sig[len + 1] < 0)
slen++;
/* 4 = 2 * (INT, value) */
seqlen = (byte) (rlen + slen + 4);
/* 2 = 1 * (SEQ, value) */
byte [] array = new byte[seqlen +... | [
"public",
"static",
"byte",
"[",
"]",
"fromDNS",
"(",
"byte",
"[",
"]",
"sig",
")",
"{",
"final",
"int",
"len",
"=",
"20",
";",
"int",
"n",
"=",
"0",
";",
"byte",
"rlen",
",",
"slen",
",",
"seqlen",
";",
"rlen",
"=",
"len",
";",
"if",
"(",
"s... | Converts the signature field in a SIG record to the
format expected by the DSA verification routines. | [
"Converts",
"the",
"signature",
"field",
"in",
"a",
"SIG",
"record",
"to",
"the",
"format",
"expected",
"by",
"the",
"DSA",
"verification",
"routines",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/xbill/DNS/security/DSASignature.java#L27-L62 |
100,605 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java | HttpOutputStream.setBufferSize | public void setBufferSize(int size)
throws IllegalStateException
{
if (size<=_bufferSize)
return;
if (_bufferedOut!=null && _bufferedOut.size()>0)
throw new IllegalStateException("Not Reset");
try
{
_bufferSize=size;
i... | java | public void setBufferSize(int size)
throws IllegalStateException
{
if (size<=_bufferSize)
return;
if (_bufferedOut!=null && _bufferedOut.size()>0)
throw new IllegalStateException("Not Reset");
try
{
_bufferSize=size;
i... | [
"public",
"void",
"setBufferSize",
"(",
"int",
"size",
")",
"throws",
"IllegalStateException",
"{",
"if",
"(",
"size",
"<=",
"_bufferSize",
")",
"return",
";",
"if",
"(",
"_bufferedOut",
"!=",
"null",
"&&",
"_bufferedOut",
".",
"size",
"(",
")",
">",
"0",
... | Set the output buffer size.
Note that this is the minimal buffer size and that installed
filters may perform their own buffering and are likely to change
the size of the output. Also the pre and post reserve buffers may be
allocated within the buffer for headers and chunking.
@param size Minimum buffer size in bytes
@e... | [
"Set",
"the",
"output",
"buffer",
"size",
".",
"Note",
"that",
"this",
"is",
"the",
"minimal",
"buffer",
"size",
"and",
"that",
"installed",
"filters",
"may",
"perform",
"their",
"own",
"buffering",
"and",
"are",
"likely",
"to",
"change",
"the",
"size",
"o... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L167-L189 |
100,606 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java | HttpOutputStream.resetBuffer | public void resetBuffer()
throws IllegalStateException
{
// Shutdown filters without observation
if (_out!=null && _out!=_realOut)
{
ArrayList save_observers=_observers;
_observers=null;
_nulled=true;
try
{
... | java | public void resetBuffer()
throws IllegalStateException
{
// Shutdown filters without observation
if (_out!=null && _out!=_realOut)
{
ArrayList save_observers=_observers;
_observers=null;
_nulled=true;
try
{
... | [
"public",
"void",
"resetBuffer",
"(",
")",
"throws",
"IllegalStateException",
"{",
"// Shutdown filters without observation",
"if",
"(",
"_out",
"!=",
"null",
"&&",
"_out",
"!=",
"_realOut",
")",
"{",
"ArrayList",
"save_observers",
"=",
"_observers",
";",
"_observer... | Reset Buffered output.
If no data has been committed, the buffer output is discarded and
the filters may be reinitialized.
@exception IllegalStateException | [
"Reset",
"Buffered",
"output",
".",
"If",
"no",
"data",
"has",
"been",
"committed",
"the",
"buffer",
"output",
"is",
"discarded",
"and",
"the",
"filters",
"may",
"be",
"reinitialized",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L203-L245 |
100,607 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java | HttpOutputStream.setChunking | public void setChunking()
{
checkOutput();
if (_bufferedOut instanceof ChunkingOutputStream)
((ChunkingOutputStream)_bufferedOut).setChunking(true);
else
throw new IllegalStateException(_bufferedOut.getClass().toString());
} | java | public void setChunking()
{
checkOutput();
if (_bufferedOut instanceof ChunkingOutputStream)
((ChunkingOutputStream)_bufferedOut).setChunking(true);
else
throw new IllegalStateException(_bufferedOut.getClass().toString());
} | [
"public",
"void",
"setChunking",
"(",
")",
"{",
"checkOutput",
"(",
")",
";",
"if",
"(",
"_bufferedOut",
"instanceof",
"ChunkingOutputStream",
")",
"(",
"(",
"ChunkingOutputStream",
")",
"_bufferedOut",
")",
".",
"setChunking",
"(",
"true",
")",
";",
"else",
... | Set chunking mode. | [
"Set",
"chunking",
"mode",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L311-L318 |
100,608 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java | HttpOutputStream.resetStream | public void resetStream()
throws IOException, IllegalStateException
{
if (isChunking())
close();
_out=null;
_nulled=true;
if (_bufferedOut!=null)
{
_bufferedOut.resetStream();
if (_bufferedOut instanceof ChunkingOutputStrea... | java | public void resetStream()
throws IOException, IllegalStateException
{
if (isChunking())
close();
_out=null;
_nulled=true;
if (_bufferedOut!=null)
{
_bufferedOut.resetStream();
if (_bufferedOut instanceof ChunkingOutputStrea... | [
"public",
"void",
"resetStream",
"(",
")",
"throws",
"IOException",
",",
"IllegalStateException",
"{",
"if",
"(",
"isChunking",
"(",
")",
")",
"close",
"(",
")",
";",
"_out",
"=",
"null",
";",
"_nulled",
"=",
"true",
";",
"if",
"(",
"_bufferedOut",
"!=",... | Reset the stream.
Turn disable all filters.
@exception IllegalStateException The stream cannot be
reset if chunking is enabled. | [
"Reset",
"the",
"stream",
".",
"Turn",
"disable",
"all",
"filters",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpOutputStream.java#L335-L365 |
100,609 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java | IPAccessHandler.handle | public void handle(String pathInContext, String pathParams, HttpRequest request,
HttpResponse response) throws HttpException, IOException
{
// exempt error pages
// TODO This probably should be more general?
if (request.getAttribute("javax.servlet.error.status_code") != null) re... | java | public void handle(String pathInContext, String pathParams, HttpRequest request,
HttpResponse response) throws HttpException, IOException
{
// exempt error pages
// TODO This probably should be more general?
if (request.getAttribute("javax.servlet.error.status_code") != null) re... | [
"public",
"void",
"handle",
"(",
"String",
"pathInContext",
",",
"String",
"pathParams",
",",
"HttpRequest",
"request",
",",
"HttpResponse",
"response",
")",
"throws",
"HttpException",
",",
"IOException",
"{",
"// exempt error pages",
"// TODO This probably should be more... | Handles the incoming request
@param pathInContext
@param pathParams
@param request The incoming HTTP-request
@param response The outgoing HTTP-response | [
"Handles",
"the",
"incoming",
"request"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java#L89-L122 |
100,610 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java | IPAccessHandler.setStandard | public void setStandard(String s)
{
s = s.toLowerCase();
if (s.indexOf("allow") > -1)
{
standard = true;
}
else
{
standard = false;
}
} | java | public void setStandard(String s)
{
s = s.toLowerCase();
if (s.indexOf("allow") > -1)
{
standard = true;
}
else
{
standard = false;
}
} | [
"public",
"void",
"setStandard",
"(",
"String",
"s",
")",
"{",
"s",
"=",
"s",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"s",
".",
"indexOf",
"(",
"\"allow\"",
")",
">",
"-",
"1",
")",
"{",
"standard",
"=",
"true",
";",
"}",
"else",
"{",
"st... | Set the standard action beeing taken when not registred IPs wants access
@param s The standard-string (either 'allow' or 'deny') | [
"Set",
"the",
"standard",
"action",
"beeing",
"taken",
"when",
"not",
"registred",
"IPs",
"wants",
"access"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java#L149-L160 |
100,611 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java | IPAccessHandler.main | private static void main(String[] args)
{
IPAccessHandler ipah = new IPAccessHandler();
ipah.setStandard("deny");
ipah.setAllowIP("217.215.71.167");
ipah.setDenyIP("217.215.71.149");
System.out.println(ipah.checkIP("217.215.71.245") + " = false");
System.out.println(i... | java | private static void main(String[] args)
{
IPAccessHandler ipah = new IPAccessHandler();
ipah.setStandard("deny");
ipah.setAllowIP("217.215.71.167");
ipah.setDenyIP("217.215.71.149");
System.out.println(ipah.checkIP("217.215.71.245") + " = false");
System.out.println(i... | [
"private",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"IPAccessHandler",
"ipah",
"=",
"new",
"IPAccessHandler",
"(",
")",
";",
"ipah",
".",
"setStandard",
"(",
"\"deny\"",
")",
";",
"ipah",
".",
"setAllowIP",
"(",
"\"217.215.71.16... | Main method for testing & debugging. | [
"Main",
"method",
"for",
"testing",
"&",
"debugging",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/IPAccessHandler.java#L166-L185 |
100,612 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpRequest.java | ServletHttpRequest.setServletPaths | void setServletPaths(String servletPath,
String pathInfo,
ServletHolder holder)
{
_servletPath=servletPath;
_pathInfo=pathInfo;
_servletHolder=holder;
} | java | void setServletPaths(String servletPath,
String pathInfo,
ServletHolder holder)
{
_servletPath=servletPath;
_pathInfo=pathInfo;
_servletHolder=holder;
} | [
"void",
"setServletPaths",
"(",
"String",
"servletPath",
",",
"String",
"pathInfo",
",",
"ServletHolder",
"holder",
")",
"{",
"_servletPath",
"=",
"servletPath",
";",
"_pathInfo",
"=",
"pathInfo",
";",
"_servletHolder",
"=",
"holder",
";",
"}"
] | Set servletpath and pathInfo.
Called by the Handler before passing a request to a particular
holder to split the context path into a servlet path and path info.
@param servletPath
@param pathInfo | [
"Set",
"servletpath",
"and",
"pathInfo",
".",
"Called",
"by",
"the",
"Handler",
"before",
"passing",
"a",
"request",
"to",
"a",
"particular",
"holder",
"to",
"split",
"the",
"context",
"path",
"into",
"a",
"servlet",
"path",
"and",
"path",
"info",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpRequest.java#L145-L152 |
100,613 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpRequest.java | ServletHttpRequest.unwrap | public static ServletHttpRequest unwrap(ServletRequest request)
{
while (!(request instanceof ServletHttpRequest))
{
if (request instanceof ServletRequestWrapper)
{
ServletRequestWrapper wrapper =
(ServletRequestWrapper)request;
... | java | public static ServletHttpRequest unwrap(ServletRequest request)
{
while (!(request instanceof ServletHttpRequest))
{
if (request instanceof ServletRequestWrapper)
{
ServletRequestWrapper wrapper =
(ServletRequestWrapper)request;
... | [
"public",
"static",
"ServletHttpRequest",
"unwrap",
"(",
"ServletRequest",
"request",
")",
"{",
"while",
"(",
"!",
"(",
"request",
"instanceof",
"ServletHttpRequest",
")",
")",
"{",
"if",
"(",
"request",
"instanceof",
"ServletRequestWrapper",
")",
"{",
"ServletReq... | Unwrap a ServletRequest.
@see javax.servlet.ServletRequestWrapper
@see javax.servlet.http.HttpServletRequestWrapper
@param request
@return The core ServletHttpRequest which must be the
underlying request object | [
"Unwrap",
"a",
"ServletRequest",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/ServletHttpRequest.java#L802-L817 |
100,614 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getTimeStampStr | public String getTimeStampStr()
{
if (_timeStampStr == null && _timeStamp > 0)
_timeStampStr = HttpFields.__dateCache.format(_timeStamp);
return _timeStampStr;
} | java | public String getTimeStampStr()
{
if (_timeStampStr == null && _timeStamp > 0)
_timeStampStr = HttpFields.__dateCache.format(_timeStamp);
return _timeStampStr;
} | [
"public",
"String",
"getTimeStampStr",
"(",
")",
"{",
"if",
"(",
"_timeStampStr",
"==",
"null",
"&&",
"_timeStamp",
">",
"0",
")",
"_timeStampStr",
"=",
"HttpFields",
".",
"__dateCache",
".",
"format",
"(",
"_timeStamp",
")",
";",
"return",
"_timeStampStr",
... | Get Request TimeStamp
@return The time that the request was received. | [
"Get",
"Request",
"TimeStamp"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L134-L139 |
100,615 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.isHandled | public boolean isHandled()
{
if (_handled) return true;
HttpResponse response = getHttpResponse();
return (response != null && response.getState() != HttpMessage.__MSG_EDITABLE);
} | java | public boolean isHandled()
{
if (_handled) return true;
HttpResponse response = getHttpResponse();
return (response != null && response.getState() != HttpMessage.__MSG_EDITABLE);
} | [
"public",
"boolean",
"isHandled",
"(",
")",
"{",
"if",
"(",
"_handled",
")",
"return",
"true",
";",
"HttpResponse",
"response",
"=",
"getHttpResponse",
"(",
")",
";",
"return",
"(",
"response",
"!=",
"null",
"&&",
"response",
".",
"getState",
"(",
")",
"... | Is the request handled.
@return True if the request has been set to handled or the associated response is not
editable. | [
"Is",
"the",
"request",
"handled",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L186-L192 |
100,616 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.readHeader | public void readHeader(LineInput in) throws IOException
{
_state = __MSG_BAD;
// Get start line
org.browsermob.proxy.jetty.util.LineInput.LineBuffer line_buffer;
do
{
line_buffer = in.readLineBuffer();
if (line_buffer == null) throw new EOFException(... | java | public void readHeader(LineInput in) throws IOException
{
_state = __MSG_BAD;
// Get start line
org.browsermob.proxy.jetty.util.LineInput.LineBuffer line_buffer;
do
{
line_buffer = in.readLineBuffer();
if (line_buffer == null) throw new EOFException(... | [
"public",
"void",
"readHeader",
"(",
"LineInput",
"in",
")",
"throws",
"IOException",
"{",
"_state",
"=",
"__MSG_BAD",
";",
"// Get start line",
"org",
".",
"browsermob",
".",
"proxy",
".",
"jetty",
".",
"util",
".",
"LineInput",
".",
"LineBuffer",
"line_buffe... | Read the request line and header.
@param in
@exception IOException | [
"Read",
"the",
"request",
"line",
"and",
"header",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L212-L254 |
100,617 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.writeRequestLine | public void writeRequestLine(Writer writer) throws IOException
{
writer.write(_method);
writer.write(' ');
writer.write(_uri != null ? _uri.toString() : "null");
writer.write(' ');
writer.write(_version);
} | java | public void writeRequestLine(Writer writer) throws IOException
{
writer.write(_method);
writer.write(' ');
writer.write(_uri != null ? _uri.toString() : "null");
writer.write(' ');
writer.write(_version);
} | [
"public",
"void",
"writeRequestLine",
"(",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"writer",
".",
"write",
"(",
"_method",
")",
";",
"writer",
".",
"write",
"(",
"'",
"'",
")",
";",
"writer",
".",
"write",
"(",
"_uri",
"!=",
"null",
"?",... | Write the HTTP request line as it was received. | [
"Write",
"the",
"HTTP",
"request",
"line",
"as",
"it",
"was",
"received",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L260-L267 |
100,618 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getScheme | public String getScheme()
{
String scheme = _uri.getScheme();
if (scheme == null && _connection != null) scheme = _connection.getDefaultScheme();
return scheme == null ? "http" : scheme;
} | java | public String getScheme()
{
String scheme = _uri.getScheme();
if (scheme == null && _connection != null) scheme = _connection.getDefaultScheme();
return scheme == null ? "http" : scheme;
} | [
"public",
"String",
"getScheme",
"(",
")",
"{",
"String",
"scheme",
"=",
"_uri",
".",
"getScheme",
"(",
")",
";",
"if",
"(",
"scheme",
"==",
"null",
"&&",
"_connection",
"!=",
"null",
")",
"scheme",
"=",
"_connection",
".",
"getDefaultScheme",
"(",
")",
... | Get the request Scheme. The scheme is obtained from an absolute URI. If the URI in the
request is not absolute, then the connections default scheme is returned. If there is no
connection "http" is returned.
@return The request scheme (eg. "http", "https", etc.) | [
"Get",
"the",
"request",
"Scheme",
".",
"The",
"scheme",
"is",
"obtained",
"from",
"an",
"absolute",
"URI",
".",
"If",
"the",
"URI",
"in",
"the",
"request",
"is",
"not",
"absolute",
"then",
"the",
"connections",
"default",
"scheme",
"is",
"returned",
".",
... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L403-L408 |
100,619 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getHost | public String getHost()
{
// Return already determined host
if (_host != null) return _host;
// Return host from absolute URI
_host = _uri.getHost();
_port = _uri.getPort();
if (_host != null) return _host;
// Return host from header field
_hostPort ... | java | public String getHost()
{
// Return already determined host
if (_host != null) return _host;
// Return host from absolute URI
_host = _uri.getHost();
_port = _uri.getPort();
if (_host != null) return _host;
// Return host from header field
_hostPort ... | [
"public",
"String",
"getHost",
"(",
")",
"{",
"// Return already determined host",
"if",
"(",
"_host",
"!=",
"null",
")",
"return",
"_host",
";",
"// Return host from absolute URI",
"_host",
"=",
"_uri",
".",
"getHost",
"(",
")",
";",
"_port",
"=",
"_uri",
"."... | Get the request host.
@return The host name obtained from an absolute URI, the HTTP header field, the requests
connection or the local host name. | [
"Get",
"the",
"request",
"host",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L435-L489 |
100,620 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getPort | public int getPort()
{
if (_port > 0) return _port;
if (_host != null) return 0;
if (_uri.isAbsolute())
_port = _uri.getPort();
else if (_connection != null) _port = _connection.getServerPort();
return _port;
} | java | public int getPort()
{
if (_port > 0) return _port;
if (_host != null) return 0;
if (_uri.isAbsolute())
_port = _uri.getPort();
else if (_connection != null) _port = _connection.getServerPort();
return _port;
} | [
"public",
"int",
"getPort",
"(",
")",
"{",
"if",
"(",
"_port",
">",
"0",
")",
"return",
"_port",
";",
"if",
"(",
"_host",
"!=",
"null",
")",
"return",
"0",
";",
"if",
"(",
"_uri",
".",
"isAbsolute",
"(",
")",
")",
"_port",
"=",
"_uri",
".",
"ge... | Get the request port. The port is obtained either from an absolute URI, the HTTP Host header
field, the connection or the default.
@return The port. 0 should be interpreted as the default port. | [
"Get",
"the",
"request",
"port",
".",
"The",
"port",
"is",
"obtained",
"either",
"from",
"an",
"absolute",
"URI",
"the",
"HTTP",
"Host",
"header",
"field",
"the",
"connection",
"or",
"the",
"default",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L498-L506 |
100,621 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.forceRemoveField | Object forceRemoveField(String name)
{
int saved_state = _state;
try
{
_state = __MSG_EDITABLE;
return removeField(name);
}
finally
{
_state = saved_state;
}
} | java | Object forceRemoveField(String name)
{
int saved_state = _state;
try
{
_state = __MSG_EDITABLE;
return removeField(name);
}
finally
{
_state = saved_state;
}
} | [
"Object",
"forceRemoveField",
"(",
"String",
"name",
")",
"{",
"int",
"saved_state",
"=",
"_state",
";",
"try",
"{",
"_state",
"=",
"__MSG_EDITABLE",
";",
"return",
"removeField",
"(",
"name",
")",
";",
"}",
"finally",
"{",
"_state",
"=",
"saved_state",
";... | Force a removeField. This call ignores the message state and forces a field to be removed
from the request. It is required for the handling of the Connection field.
@param name The field name
@return The old value or null. | [
"Force",
"a",
"removeField",
".",
"This",
"call",
"ignores",
"the",
"message",
"state",
"and",
"forces",
"a",
"field",
"to",
"be",
"removed",
"from",
"the",
"request",
".",
"It",
"is",
"required",
"for",
"the",
"handling",
"of",
"the",
"Connection",
"field... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L742-L754 |
100,622 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getAcceptableTransferCodings | public List getAcceptableTransferCodings()
{
if (_dotVersion < 1) return null;
if (_te != null) return _te;
// Decode any TE field
Enumeration tenum = getFieldValues(HttpFields.__TE, HttpFields.__separators);
if (tenum != null)
{
// Sort the list
... | java | public List getAcceptableTransferCodings()
{
if (_dotVersion < 1) return null;
if (_te != null) return _te;
// Decode any TE field
Enumeration tenum = getFieldValues(HttpFields.__TE, HttpFields.__separators);
if (tenum != null)
{
// Sort the list
... | [
"public",
"List",
"getAcceptableTransferCodings",
"(",
")",
"{",
"if",
"(",
"_dotVersion",
"<",
"1",
")",
"return",
"null",
";",
"if",
"(",
"_te",
"!=",
"null",
")",
"return",
"_te",
";",
"// Decode any TE field",
"Enumeration",
"tenum",
"=",
"getFieldValues",... | Get the acceptable transfer encodings. The TE field is used to construct a list of acceptable
extension transfer codings in quality order. An empty list implies that only "chunked" is
acceptable. A null list implies that no transfer coding can be applied.
If the "trailer" coding is found in the TE field, then message ... | [
"Get",
"the",
"acceptable",
"transfer",
"encodings",
".",
"The",
"TE",
"field",
"is",
"used",
"to",
"construct",
"a",
"list",
"of",
"acceptable",
"extension",
"transfer",
"codings",
"in",
"quality",
"order",
".",
"An",
"empty",
"list",
"implies",
"that",
"on... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L767-L807 |
100,623 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.getParameter | public String getParameter(String name)
{
if (!_paramsExtracted) extractParameters();
return (String) _parameters.getValue(name, 0);
} | java | public String getParameter(String name)
{
if (!_paramsExtracted) extractParameters();
return (String) _parameters.getValue(name, 0);
} | [
"public",
"String",
"getParameter",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"!",
"_paramsExtracted",
")",
"extractParameters",
"(",
")",
";",
"return",
"(",
"String",
")",
"_parameters",
".",
"getValue",
"(",
"name",
",",
"0",
")",
";",
"}"
] | Get a parameter value.
@param name Parameter name
@return Parameter value | [
"Get",
"a",
"parameter",
"value",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L923-L927 |
100,624 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.recycle | void recycle(HttpConnection connection)
{
_method = null;
//_uri=null;
_host = null;
_hostPort = null;
_port = 0;
_te = null;
if (_parameters != null) _parameters.clear();
_paramsExtracted = false;
_handled = false;
_cookiesExtracted = ... | java | void recycle(HttpConnection connection)
{
_method = null;
//_uri=null;
_host = null;
_hostPort = null;
_port = 0;
_te = null;
if (_parameters != null) _parameters.clear();
_paramsExtracted = false;
_handled = false;
_cookiesExtracted = ... | [
"void",
"recycle",
"(",
"HttpConnection",
"connection",
")",
"{",
"_method",
"=",
"null",
";",
"//_uri=null;",
"_host",
"=",
"null",
";",
"_hostPort",
"=",
"null",
";",
"_port",
"=",
"0",
";",
"_te",
"=",
"null",
";",
"if",
"(",
"_parameters",
"!=",
"n... | Recycle the request. | [
"Recycle",
"the",
"request",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L1173-L1191 |
100,625 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java | HttpRequest.destroy | public void destroy()
{
_parameters = null;
_method = null;
_uri = null;
_host = null;
_hostPort = null;
_te = null;
_cookies = null;
_lastCookies = null;
_timeStampStr = null;
_userPrincipal = null;
_authUser = null;
_a... | java | public void destroy()
{
_parameters = null;
_method = null;
_uri = null;
_host = null;
_hostPort = null;
_te = null;
_cookies = null;
_lastCookies = null;
_timeStampStr = null;
_userPrincipal = null;
_authUser = null;
_a... | [
"public",
"void",
"destroy",
"(",
")",
"{",
"_parameters",
"=",
"null",
";",
"_method",
"=",
"null",
";",
"_uri",
"=",
"null",
";",
"_host",
"=",
"null",
";",
"_hostPort",
"=",
"null",
";",
"_te",
"=",
"null",
";",
"_cookies",
"=",
"null",
";",
"_l... | Destroy the request. Help the garbage collector by null everything that we can. | [
"Destroy",
"the",
"request",
".",
"Help",
"the",
"garbage",
"collector",
"by",
"null",
"everything",
"that",
"we",
"can",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpRequest.java#L1197-L1213 |
100,626 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/InetAddrPort.java | InetAddrPort.getHost | public String getHost()
{
if (_addr==null)
return __0_0_0_0;
return _addrIsHost?_addr.getHostName():_addr.getHostAddress();
} | java | public String getHost()
{
if (_addr==null)
return __0_0_0_0;
return _addrIsHost?_addr.getHostName():_addr.getHostAddress();
} | [
"public",
"String",
"getHost",
"(",
")",
"{",
"if",
"(",
"_addr",
"==",
"null",
")",
"return",
"__0_0_0_0",
";",
"return",
"_addrIsHost",
"?",
"_addr",
".",
"getHostName",
"(",
")",
":",
"_addr",
".",
"getHostAddress",
"(",
")",
";",
"}"
] | Get the Host.
@return The IP address | [
"Get",
"the",
"Host",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/InetAddrPort.java#L112-L118 |
100,627 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/InetAddrPort.java | InetAddrPort.setHost | public void setHost(String host)
throws java.net.UnknownHostException
{
_addr=null;
if (host!=null)
{
if (host.indexOf('/')>0)
host=host.substring(0,host.indexOf('/'));
_addrIsHost=!Character.isDigit((host.charAt(0)));
_addr=InetAdd... | java | public void setHost(String host)
throws java.net.UnknownHostException
{
_addr=null;
if (host!=null)
{
if (host.indexOf('/')>0)
host=host.substring(0,host.indexOf('/'));
_addrIsHost=!Character.isDigit((host.charAt(0)));
_addr=InetAdd... | [
"public",
"void",
"setHost",
"(",
"String",
"host",
")",
"throws",
"java",
".",
"net",
".",
"UnknownHostException",
"{",
"_addr",
"=",
"null",
";",
"if",
"(",
"host",
"!=",
"null",
")",
"{",
"if",
"(",
"host",
".",
"indexOf",
"(",
"'",
"'",
")",
">... | Set the Host.
@param host
@exception java.net.UnknownHostException | [
"Set",
"the",
"Host",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/InetAddrPort.java#L125-L136 |
100,628 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/Container.java | Container.start | public synchronized final void start()
throws Exception
{
if (_started || _starting)
return;
_starting=true;
if (log.isDebugEnabled()) log.debug("Starting "+this);
LifeCycleEvent event = new LifeCycleEvent(this);
for(int i=0;i<LazyList.size(... | java | public synchronized final void start()
throws Exception
{
if (_started || _starting)
return;
_starting=true;
if (log.isDebugEnabled()) log.debug("Starting "+this);
LifeCycleEvent event = new LifeCycleEvent(this);
for(int i=0;i<LazyList.size(... | [
"public",
"synchronized",
"final",
"void",
"start",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"_started",
"||",
"_starting",
")",
"return",
";",
"_starting",
"=",
"true",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"... | Start the server.
Generate LifeCycleEvents for starting and started either side of a call to doStart | [
"Start",
"the",
"server",
".",
"Generate",
"LifeCycleEvents",
"for",
"starting",
"and",
"started",
"either",
"side",
"of",
"a",
"call",
"to",
"doStart"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/Container.java#L53-L103 |
100,629 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/Container.java | Container.stop | public synchronized final void stop()
throws InterruptedException
{
if (!_started || _stopping)
return;
_stopping=true;
if (log.isDebugEnabled()) log.debug("Stopping "+this);
LifeCycleEvent event = new LifeCycleEvent(this);
for(int i=0;i<LazyList.size(_event... | java | public synchronized final void stop()
throws InterruptedException
{
if (!_started || _stopping)
return;
_stopping=true;
if (log.isDebugEnabled()) log.debug("Stopping "+this);
LifeCycleEvent event = new LifeCycleEvent(this);
for(int i=0;i<LazyList.size(_event... | [
"public",
"synchronized",
"final",
"void",
"stop",
"(",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"!",
"_started",
"||",
"_stopping",
")",
"return",
";",
"_stopping",
"=",
"true",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
... | Stop the container.
Generate LifeCycleEvents for stopping and stopped either side of a call to doStop | [
"Stop",
"the",
"container",
".",
"Generate",
"LifeCycleEvents",
"for",
"stopping",
"and",
"stopped",
"either",
"side",
"of",
"a",
"call",
"to",
"doStop"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/Container.java#L136-L185 |
100,630 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/Container.java | Container.addEventListener | public void addEventListener(EventListener listener)
throws IllegalArgumentException
{
if (_eventListeners==null)
_eventListeners=new ArrayList();
if (listener instanceof ComponentListener ||
listener instanceof LifeCycleListener )
{
... | java | public void addEventListener(EventListener listener)
throws IllegalArgumentException
{
if (_eventListeners==null)
_eventListeners=new ArrayList();
if (listener instanceof ComponentListener ||
listener instanceof LifeCycleListener )
{
... | [
"public",
"void",
"addEventListener",
"(",
"EventListener",
"listener",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"_eventListeners",
"==",
"null",
")",
"_eventListeners",
"=",
"new",
"ArrayList",
"(",
")",
";",
"if",
"(",
"listener",
"instanceof",... | Add a server event listener.
@param listener ComponentEventListener or LifeCycleEventListener | [
"Add",
"a",
"server",
"event",
"listener",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/Container.java#L233-L247 |
100,631 | webmetrics/browsermob-proxy | src/main/java/org/xbill/DNS/Flags.java | Flags.isFlag | public static boolean
isFlag(int index) {
flags.check(index);
if ((index >= 1 && index <= 4) || (index >= 12))
return false;
return true;
} | java | public static boolean
isFlag(int index) {
flags.check(index);
if ((index >= 1 && index <= 4) || (index >= 12))
return false;
return true;
} | [
"public",
"static",
"boolean",
"isFlag",
"(",
"int",
"index",
")",
"{",
"flags",
".",
"check",
"(",
"index",
")",
";",
"if",
"(",
"(",
"index",
">=",
"1",
"&&",
"index",
"<=",
"4",
")",
"||",
"(",
"index",
">=",
"12",
")",
")",
"return",
"false",... | Indicates if a bit in the flags field is a flag or not. If it's part of
the rcode or opcode, it's not. | [
"Indicates",
"if",
"a",
"bit",
"in",
"the",
"flags",
"field",
"is",
"a",
"flag",
"or",
"not",
".",
"If",
"it",
"s",
"part",
"of",
"the",
"rcode",
"or",
"opcode",
"it",
"s",
"not",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/xbill/DNS/Flags.java#L73-L79 |
100,632 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/nio/ByteBufferInputStream.java | ByteBufferInputStream.getBuffer | public synchronized ByteBuffer getBuffer()
{
ByteBuffer buf=null;
int s=LazyList.size(_recycle);
if (s>0)
{
s--;
buf=(ByteBuffer)LazyList.get(_recycle, s);
_recycle=LazyList.remove(_recycle,s);
buf.clear();
}
else
... | java | public synchronized ByteBuffer getBuffer()
{
ByteBuffer buf=null;
int s=LazyList.size(_recycle);
if (s>0)
{
s--;
buf=(ByteBuffer)LazyList.get(_recycle, s);
_recycle=LazyList.remove(_recycle,s);
buf.clear();
}
else
... | [
"public",
"synchronized",
"ByteBuffer",
"getBuffer",
"(",
")",
"{",
"ByteBuffer",
"buf",
"=",
"null",
";",
"int",
"s",
"=",
"LazyList",
".",
"size",
"(",
"_recycle",
")",
";",
"if",
"(",
"s",
">",
"0",
")",
"{",
"s",
"--",
";",
"buf",
"=",
"(",
"... | Get a buffer to write to this InputStream.
The buffer wll either be a new direct buffer or a recycled buffer. | [
"Get",
"a",
"buffer",
"to",
"write",
"to",
"this",
"InputStream",
".",
"The",
"buffer",
"wll",
"either",
"be",
"a",
"new",
"direct",
"buffer",
"or",
"a",
"recycled",
"buffer",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/nio/ByteBufferInputStream.java#L238-L254 |
100,633 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/Table.java | Table.newRow | public Table newRow()
{
unnest();
nest(row = new Block("tr"));
if (_defaultRow!=null)
{
row.setAttributesFrom(_defaultRow);
if (_defaultRow.size()>0)
row.add(_defaultRow.contents());
}
cell=null;
return this;
} | java | public Table newRow()
{
unnest();
nest(row = new Block("tr"));
if (_defaultRow!=null)
{
row.setAttributesFrom(_defaultRow);
if (_defaultRow.size()>0)
row.add(_defaultRow.contents());
}
cell=null;
return this;
} | [
"public",
"Table",
"newRow",
"(",
")",
"{",
"unnest",
"(",
")",
";",
"nest",
"(",
"row",
"=",
"new",
"Block",
"(",
"\"tr\"",
")",
")",
";",
"if",
"(",
"_defaultRow",
"!=",
"null",
")",
"{",
"row",
".",
"setAttributesFrom",
"(",
"_defaultRow",
")",
... | Create new table row.
Attributes set after this call and before a call to newCell or
newHeader are considered row attributes. | [
"Create",
"new",
"table",
"row",
".",
"Attributes",
"set",
"after",
"this",
"call",
"and",
"before",
"a",
"call",
"to",
"newCell",
"or",
"newHeader",
"are",
"considered",
"row",
"attributes",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/Table.java#L79-L91 |
100,634 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/Table.java | Table.spacing | public Table spacing(int h, int v)
{
if (h>=0)
attribute("hspace",h);
if (v>=0)
attribute("vspace",v);
return this;
} | java | public Table spacing(int h, int v)
{
if (h>=0)
attribute("hspace",h);
if (v>=0)
attribute("vspace",v);
return this;
} | [
"public",
"Table",
"spacing",
"(",
"int",
"h",
",",
"int",
"v",
")",
"{",
"if",
"(",
"h",
">=",
"0",
")",
"attribute",
"(",
"\"hspace\"",
",",
"h",
")",
";",
"if",
"(",
"v",
">=",
"0",
")",
"attribute",
"(",
"\"vspace\"",
",",
"v",
")",
";",
... | Set horizontal and vertical spacing.
@param h horizontal spacing
@param v vertical spacing
@return This table for call chaining | [
"Set",
"horizontal",
"and",
"vertical",
"spacing",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/Table.java#L250-L257 |
100,635 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/Table.java | Table.setCellNestingFactory | public static void setCellNestingFactory(CompositeFactory factory)
{
if (threadNestingMap==null)
threadNestingMap= new Hashtable();
if (factory == null)
threadNestingMap.remove(Thread.currentThread());
else
threadNestingMap.put(Thread.currentThrea... | java | public static void setCellNestingFactory(CompositeFactory factory)
{
if (threadNestingMap==null)
threadNestingMap= new Hashtable();
if (factory == null)
threadNestingMap.remove(Thread.currentThread());
else
threadNestingMap.put(Thread.currentThrea... | [
"public",
"static",
"void",
"setCellNestingFactory",
"(",
"CompositeFactory",
"factory",
")",
"{",
"if",
"(",
"threadNestingMap",
"==",
"null",
")",
"threadNestingMap",
"=",
"new",
"Hashtable",
"(",
")",
";",
"if",
"(",
"factory",
"==",
"null",
")",
"threadNes... | Add cell nesting factory.
Set the CompositeFactory for this thread. Each new cell in the
table added by this thread will have a new Composite from this
factory nested in the Cell.
@param factory The factory for this Thread. If null clear this
threads factory.
@deprecated Use setNestingFactory or setThreadNestingFactory | [
"Add",
"cell",
"nesting",
"factory",
".",
"Set",
"the",
"CompositeFactory",
"for",
"this",
"thread",
".",
"Each",
"new",
"cell",
"in",
"the",
"table",
"added",
"by",
"this",
"thread",
"will",
"have",
"a",
"new",
"Composite",
"from",
"this",
"factory",
"nes... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/Table.java#L290-L299 |
100,636 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java | ResourceCache.setResourceBase | public void setResourceBase(String resourceBase)
{
try{
_resourceBase=Resource.newResource(resourceBase);
if(log.isDebugEnabled())log.debug("resourceBase="+_resourceBase+" for "+this);
}
catch(IOException e)
{
log.debug(LogSupport.EXCEPTION,e);
... | java | public void setResourceBase(String resourceBase)
{
try{
_resourceBase=Resource.newResource(resourceBase);
if(log.isDebugEnabled())log.debug("resourceBase="+_resourceBase+" for "+this);
}
catch(IOException e)
{
log.debug(LogSupport.EXCEPTION,e);
... | [
"public",
"void",
"setResourceBase",
"(",
"String",
"resourceBase",
")",
"{",
"try",
"{",
"_resourceBase",
"=",
"Resource",
".",
"newResource",
"(",
"resourceBase",
")",
";",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",... | Set the Resource Base.
The base resource is the Resource to use as a relative base
for all context resources. The ResourceBase attribute is a
string version of the baseResource.
If a relative file is passed, it is converted to a file
URL based on the current working directory.
@param resourceBase A URL prefix or direct... | [
"Set",
"the",
"Resource",
"Base",
".",
"The",
"base",
"resource",
"is",
"the",
"Resource",
"to",
"use",
"as",
"a",
"relative",
"base",
"for",
"all",
"context",
"resources",
".",
"The",
"ResourceBase",
"attribute",
"is",
"a",
"string",
"version",
"of",
"the... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java#L129-L140 |
100,637 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java | ResourceCache.getResource | public Resource getResource(String pathInContext)
throws IOException
{
if(log.isTraceEnabled())log.trace("getResource "+pathInContext);
if (_resourceBase==null)
return null;
Resource resource=null;
// Cache operations
synchronized(_cache)
{
... | java | public Resource getResource(String pathInContext)
throws IOException
{
if(log.isTraceEnabled())log.trace("getResource "+pathInContext);
if (_resourceBase==null)
return null;
Resource resource=null;
// Cache operations
synchronized(_cache)
{
... | [
"public",
"Resource",
"getResource",
"(",
"String",
"pathInContext",
")",
"throws",
"IOException",
"{",
"if",
"(",
"log",
".",
"isTraceEnabled",
"(",
")",
")",
"log",
".",
"trace",
"(",
"\"getResource \"",
"+",
"pathInContext",
")",
";",
"if",
"(",
"_resourc... | Get a resource from the context.
Cached Resources are returned if the resource fits within the LRU
cache. Directories may have CachedResources returned, but the
caller must use the CachedResource.setCachedData method to set the
formatted directory content.
@param pathInContext
@return Resource
@exception IOException | [
"Get",
"a",
"resource",
"from",
"the",
"context",
".",
"Cached",
"Resources",
"are",
"returned",
"if",
"the",
"resource",
"fits",
"within",
"the",
"LRU",
"cache",
".",
"Directories",
"may",
"have",
"CachedResources",
"returned",
"but",
"the",
"caller",
"must",... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java#L212-L284 |
100,638 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java | ResourceCache.getEncodingByMimeType | public String getEncodingByMimeType(String type)
{
String encoding =null;
if (type!=null)
encoding=(String)_encodingMap.get(type);
return encoding;
} | java | public String getEncodingByMimeType(String type)
{
String encoding =null;
if (type!=null)
encoding=(String)_encodingMap.get(type);
return encoding;
} | [
"public",
"String",
"getEncodingByMimeType",
"(",
"String",
"type",
")",
"{",
"String",
"encoding",
"=",
"null",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"encoding",
"=",
"(",
"String",
")",
"_encodingMap",
".",
"get",
"(",
"type",
")",
";",
"return",
... | Get char encoding by mime type.
@param type A mime type.
@return The prefered character encoding for that type if known. | [
"Get",
"char",
"encoding",
"by",
"mime",
"type",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java#L381-L389 |
100,639 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java | ResourceCache.getResourceMetaData | public ResourceMetaData getResourceMetaData(Resource resource)
{
Object o=resource.getAssociate();
if (o instanceof ResourceMetaData)
return (ResourceMetaData)o;
return new ResourceMetaData(resource);
} | java | public ResourceMetaData getResourceMetaData(Resource resource)
{
Object o=resource.getAssociate();
if (o instanceof ResourceMetaData)
return (ResourceMetaData)o;
return new ResourceMetaData(resource);
} | [
"public",
"ResourceMetaData",
"getResourceMetaData",
"(",
"Resource",
"resource",
")",
"{",
"Object",
"o",
"=",
"resource",
".",
"getAssociate",
"(",
")",
";",
"if",
"(",
"o",
"instanceof",
"ResourceMetaData",
")",
"return",
"(",
"ResourceMetaData",
")",
"o",
... | Get Resource MetaData.
@param resource
@return Meta data for the resource. | [
"Get",
"Resource",
"MetaData",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/ResourceCache.java#L449-L455 |
100,640 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/start/Version.java | Version.compare | public int compare(Version other) {
if (other == null) throw new NullPointerException("other version is null");
if (this._version < other._version) return -1;
if (this._version > other._version) return 1;
if (this._revision < other._revision) return -1;
if (this._revision > other... | java | public int compare(Version other) {
if (other == null) throw new NullPointerException("other version is null");
if (this._version < other._version) return -1;
if (this._version > other._version) return 1;
if (this._revision < other._revision) return -1;
if (this._revision > other... | [
"public",
"int",
"compare",
"(",
"Version",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
"\"other version is null\"",
")",
";",
"if",
"(",
"this",
".",
"_version",
"<",
"other",
".",
"_version",
")"... | Compares with other version. Does not take extension into account,
as there is no reliable way to order them.
@return -1 if this is older version that other,
0 if its same version,
1 if it's newer version than other | [
"Compares",
"with",
"other",
"version",
".",
"Does",
"not",
"take",
"extension",
"into",
"account",
"as",
"there",
"is",
"no",
"reliable",
"way",
"to",
"order",
"them",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/start/Version.java#L94-L103 |
100,641 | webmetrics/browsermob-proxy | src/main/java/org/xbill/DNS/ResolverConfig.java | ResolverConfig.findWin | private void
findWin(InputStream in) {
String packageName = ResolverConfig.class.getPackage().getName();
String resPackageName = packageName + ".windows.DNSServer";
ResourceBundle res = ResourceBundle.getBundle(resPackageName);
String host_name = res.getString("host_name");
String primary_dns_suffix = res.getStri... | java | private void
findWin(InputStream in) {
String packageName = ResolverConfig.class.getPackage().getName();
String resPackageName = packageName + ".windows.DNSServer";
ResourceBundle res = ResourceBundle.getBundle(resPackageName);
String host_name = res.getString("host_name");
String primary_dns_suffix = res.getStri... | [
"private",
"void",
"findWin",
"(",
"InputStream",
"in",
")",
"{",
"String",
"packageName",
"=",
"ResolverConfig",
".",
"class",
".",
"getPackage",
"(",
")",
".",
"getName",
"(",
")",
";",
"String",
"resPackageName",
"=",
"packageName",
"+",
"\".windows.DNSServ... | Parses the output of winipcfg or ipconfig. | [
"Parses",
"the",
"output",
"of",
"winipcfg",
"or",
"ipconfig",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/xbill/DNS/ResolverConfig.java#L251-L335 |
100,642 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/log/Frame.java | Frame.complete | void complete()
{
_file=_stack[_top].getFileName()+":"+_stack[_top].getLineNumber();
_method=_stack[_top].getClassName()+"."+_stack[_top].getMethodName();
_depth=_stack.length-_top;
_thread = Thread.currentThread().getName();
} | java | void complete()
{
_file=_stack[_top].getFileName()+":"+_stack[_top].getLineNumber();
_method=_stack[_top].getClassName()+"."+_stack[_top].getMethodName();
_depth=_stack.length-_top;
_thread = Thread.currentThread().getName();
} | [
"void",
"complete",
"(",
")",
"{",
"_file",
"=",
"_stack",
"[",
"_top",
"]",
".",
"getFileName",
"(",
")",
"+",
"\":\"",
"+",
"_stack",
"[",
"_top",
"]",
".",
"getLineNumber",
"(",
")",
";",
"_method",
"=",
"_stack",
"[",
"_top",
"]",
".",
"getClas... | Complete partial constructor. | [
"Complete",
"partial",
"constructor",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/log/Frame.java#L108-L114 |
100,643 | webmetrics/browsermob-proxy | src/main/java/org/xbill/DNS/spi/DNSJavaNameService.java | DNSJavaNameService.lookupAllHostAddr | public InetAddress []
lookupAllHostAddr(String host) throws UnknownHostException {
Name name = null;
try {
name = new Name(host);
}
catch (TextParseException e) {
throw new UnknownHostException(host);
}
Record [] records = null;
if (preferV6)
records = new Lookup(name, Type.AAAA).run();
if (records == n... | java | public InetAddress []
lookupAllHostAddr(String host) throws UnknownHostException {
Name name = null;
try {
name = new Name(host);
}
catch (TextParseException e) {
throw new UnknownHostException(host);
}
Record [] records = null;
if (preferV6)
records = new Lookup(name, Type.AAAA).run();
if (records == n... | [
"public",
"InetAddress",
"[",
"]",
"lookupAllHostAddr",
"(",
"String",
"host",
")",
"throws",
"UnknownHostException",
"{",
"Name",
"name",
"=",
"null",
";",
"try",
"{",
"name",
"=",
"new",
"Name",
"(",
"host",
")",
";",
"}",
"catch",
"(",
"TextParseExcepti... | Performs a forward DNS lookup for the host name.
@param host The host name to resolve.
@return All the ip addresses found for the host name. | [
"Performs",
"a",
"forward",
"DNS",
"lookup",
"for",
"the",
"host",
"name",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/xbill/DNS/spi/DNSJavaNameService.java#L110-L143 |
100,644 | webmetrics/browsermob-proxy | src/main/java/org/xbill/DNS/spi/DNSJavaNameService.java | DNSJavaNameService.getHostByAddr | public String getHostByAddr(byte [] addr) throws UnknownHostException {
Name name = ReverseMap.fromAddress(InetAddress.getByAddress(addr));
Record [] records = new Lookup(name, Type.PTR).run();
if (records == null)
throw new UnknownHostException();
return ((PTRRecord) records[0]).getTarget().toString();
} | java | public String getHostByAddr(byte [] addr) throws UnknownHostException {
Name name = ReverseMap.fromAddress(InetAddress.getByAddress(addr));
Record [] records = new Lookup(name, Type.PTR).run();
if (records == null)
throw new UnknownHostException();
return ((PTRRecord) records[0]).getTarget().toString();
} | [
"public",
"String",
"getHostByAddr",
"(",
"byte",
"[",
"]",
"addr",
")",
"throws",
"UnknownHostException",
"{",
"Name",
"name",
"=",
"ReverseMap",
".",
"fromAddress",
"(",
"InetAddress",
".",
"getByAddress",
"(",
"addr",
")",
")",
";",
"Record",
"[",
"]",
... | Performs a reverse DNS lookup.
@param addr The ip address to lookup.
@return The host name found for the ip address. | [
"Performs",
"a",
"reverse",
"DNS",
"lookup",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/xbill/DNS/spi/DNSJavaNameService.java#L150-L156 |
100,645 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/selenium/ThumbprintUtil.java | ThumbprintUtil.getThumbprint | public static String getThumbprint(final X509Certificate cert) throws CertificateEncodingException {
if(cert == null)
{
return null;
}
byte[] rawOctets = cert.getEncoded();
SHA1Digest digest = new SHA1Digest();
byte[] digestOctets = new byte[digest.getDigestSize()];
digest.update(rawOctets, 0, raw... | java | public static String getThumbprint(final X509Certificate cert) throws CertificateEncodingException {
if(cert == null)
{
return null;
}
byte[] rawOctets = cert.getEncoded();
SHA1Digest digest = new SHA1Digest();
byte[] digestOctets = new byte[digest.getDigestSize()];
digest.update(rawOctets, 0, raw... | [
"public",
"static",
"String",
"getThumbprint",
"(",
"final",
"X509Certificate",
"cert",
")",
"throws",
"CertificateEncodingException",
"{",
"if",
"(",
"cert",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"byte",
"[",
"]",
"rawOctets",
"=",
"cert",
"."... | Generates a SHA1 thumbprint of a certificate for long-term mapping.
@param cert
@return
@throws java.security.cert.CertificateEncodingException | [
"Generates",
"a",
"SHA1",
"thumbprint",
"of",
"a",
"certificate",
"for",
"long",
"-",
"term",
"mapping",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/selenium/ThumbprintUtil.java#L30-L48 |
100,646 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java | XmlParser.parse | public synchronized Node parse(String url) throws IOException,SAXException
{
if(log.isDebugEnabled())
log.debug("parse: "+url);
return parse(new InputSource(url));
} | java | public synchronized Node parse(String url) throws IOException,SAXException
{
if(log.isDebugEnabled())
log.debug("parse: "+url);
return parse(new InputSource(url));
} | [
"public",
"synchronized",
"Node",
"parse",
"(",
"String",
"url",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"parse: \"",
"+",
"url",
")",
";",
"return",
"par... | Parse string URL. | [
"Parse",
"string",
"URL",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java#L177-L182 |
100,647 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java | XmlParser.parse | public synchronized Node parse(File file) throws IOException,SAXException
{
if(log.isDebugEnabled())
log.debug("parse: "+file);
return parse(new InputSource(file.toURL().toString()));
} | java | public synchronized Node parse(File file) throws IOException,SAXException
{
if(log.isDebugEnabled())
log.debug("parse: "+file);
return parse(new InputSource(file.toURL().toString()));
} | [
"public",
"synchronized",
"Node",
"parse",
"(",
"File",
"file",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"if",
"(",
"log",
".",
"isDebugEnabled",
"(",
")",
")",
"log",
".",
"debug",
"(",
"\"parse: \"",
"+",
"file",
")",
";",
"return",
"par... | Parse File. | [
"Parse",
"File",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java#L188-L193 |
100,648 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java | XmlParser.parse | public synchronized Node parse(InputStream in) throws IOException,SAXException
{
Handler handler=new Handler();
XMLReader reader=_parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
_parser.pars... | java | public synchronized Node parse(InputStream in) throws IOException,SAXException
{
Handler handler=new Handler();
XMLReader reader=_parser.getXMLReader();
reader.setContentHandler(handler);
reader.setErrorHandler(handler);
reader.setEntityResolver(handler);
_parser.pars... | [
"public",
"synchronized",
"Node",
"parse",
"(",
"InputStream",
"in",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"Handler",
"handler",
"=",
"new",
"Handler",
"(",
")",
";",
"XMLReader",
"reader",
"=",
"_parser",
".",
"getXMLReader",
"(",
")",
";"... | Parse InputStream. | [
"Parse",
"InputStream",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java#L199-L212 |
100,649 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java | XmlParser.parse | public synchronized Node parse(URL url) throws IOException,SAXException
{
Node n=null;
InputStream is=url.openStream();
try
{
n=parse(is);
}
finally
{
try
{
is.close();
}
catch(Excepti... | java | public synchronized Node parse(URL url) throws IOException,SAXException
{
Node n=null;
InputStream is=url.openStream();
try
{
n=parse(is);
}
finally
{
try
{
is.close();
}
catch(Excepti... | [
"public",
"synchronized",
"Node",
"parse",
"(",
"URL",
"url",
")",
"throws",
"IOException",
",",
"SAXException",
"{",
"Node",
"n",
"=",
"null",
";",
"InputStream",
"is",
"=",
"url",
".",
"openStream",
"(",
")",
";",
"try",
"{",
"n",
"=",
"parse",
"(",
... | Parse URL. | [
"Parse",
"URL",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/xml/XmlParser.java#L218-L240 |
100,650 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/handler/AbstractHttpHandler.java | AbstractHttpHandler.initialize | public void initialize(HttpContext context)
{
if (_context==null)
_context=context;
else if (_context!=context)
throw new IllegalStateException("Can't initialize handler for different context");
} | java | public void initialize(HttpContext context)
{
if (_context==null)
_context=context;
else if (_context!=context)
throw new IllegalStateException("Can't initialize handler for different context");
} | [
"public",
"void",
"initialize",
"(",
"HttpContext",
"context",
")",
"{",
"if",
"(",
"_context",
"==",
"null",
")",
"_context",
"=",
"context",
";",
"else",
"if",
"(",
"_context",
"!=",
"context",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"Can't in... | Initialize with a HttpContext.
Called by addHandler methods of HttpContext.
@param context Must be the HttpContext of the handler | [
"Initialize",
"with",
"a",
"HttpContext",
".",
"Called",
"by",
"addHandler",
"methods",
"of",
"HttpContext",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/AbstractHttpHandler.java#L73-L79 |
100,651 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/jmx/ConfigurationMBean.java | ConfigurationMBean.uniqueObjectName | public synchronized ObjectName uniqueObjectName(MBeanServer server, String on)
{
ObjectName oName=null;
try{oName=new ObjectName(on+",config="+_config.getClass().getName());}
catch(Exception e){log.warn(LogSupport.EXCEPTION,e);}
return oName;
} | java | public synchronized ObjectName uniqueObjectName(MBeanServer server, String on)
{
ObjectName oName=null;
try{oName=new ObjectName(on+",config="+_config.getClass().getName());}
catch(Exception e){log.warn(LogSupport.EXCEPTION,e);}
return oName;
} | [
"public",
"synchronized",
"ObjectName",
"uniqueObjectName",
"(",
"MBeanServer",
"server",
",",
"String",
"on",
")",
"{",
"ObjectName",
"oName",
"=",
"null",
";",
"try",
"{",
"oName",
"=",
"new",
"ObjectName",
"(",
"on",
"+",
"\",config=\"",
"+",
"_config",
"... | uniqueObjectName
Make a unique jmx name for this configuration object
@see org.browsermob.proxy.jetty.util.jmx.ModelMBeanImpl#uniqueObjectName(javax.management.MBeanServer, java.lang.String) | [
"uniqueObjectName",
"Make",
"a",
"unique",
"jmx",
"name",
"for",
"this",
"configuration",
"object"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/jmx/ConfigurationMBean.java#L78-L85 |
100,652 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/log/LogStream.java | LogStream.setLogStdErr | public static void setLogStdErr(boolean log)
{
if (log)
{
if (!(System.err instanceof LogStream))
System.setErr(new LogStream.STDERR());
}
else
System.setErr(STDERR_STREAM);
} | java | public static void setLogStdErr(boolean log)
{
if (log)
{
if (!(System.err instanceof LogStream))
System.setErr(new LogStream.STDERR());
}
else
System.setErr(STDERR_STREAM);
} | [
"public",
"static",
"void",
"setLogStdErr",
"(",
"boolean",
"log",
")",
"{",
"if",
"(",
"log",
")",
"{",
"if",
"(",
"!",
"(",
"System",
".",
"err",
"instanceof",
"LogStream",
")",
")",
"System",
".",
"setErr",
"(",
"new",
"LogStream",
".",
"STDERR",
... | Log standard error stream.
If set to true, output to stderr will be directed to an instance
of LogStream and logged. Beware of log loops from logs that write to stderr. | [
"Log",
"standard",
"error",
"stream",
".",
"If",
"set",
"to",
"true",
"output",
"to",
"stderr",
"will",
"be",
"directed",
"to",
"an",
"instance",
"of",
"LogStream",
"and",
"logged",
".",
"Beware",
"of",
"log",
"loops",
"from",
"logs",
"that",
"write",
"t... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/log/LogStream.java#L46-L55 |
100,653 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/log/LogStream.java | LogStream.setLogStdOut | public static void setLogStdOut(boolean log)
{
if (log)
{
if (!(System.out instanceof LogStream))
System.setOut(new LogStream.STDOUT());
}
else
System.setOut(STDOUT_STREAM);
} | java | public static void setLogStdOut(boolean log)
{
if (log)
{
if (!(System.out instanceof LogStream))
System.setOut(new LogStream.STDOUT());
}
else
System.setOut(STDOUT_STREAM);
} | [
"public",
"static",
"void",
"setLogStdOut",
"(",
"boolean",
"log",
")",
"{",
"if",
"(",
"log",
")",
"{",
"if",
"(",
"!",
"(",
"System",
".",
"out",
"instanceof",
"LogStream",
")",
")",
"System",
".",
"setOut",
"(",
"new",
"LogStream",
".",
"STDOUT",
... | Log standard output stream.
If set to true, output to stdout will be directed to an instance
of LogStream and logged. Beware of log loops from logs that write to stdout. | [
"Log",
"standard",
"output",
"stream",
".",
"If",
"set",
"to",
"true",
"output",
"to",
"stdout",
"will",
"be",
"directed",
"to",
"an",
"instance",
"of",
"LogStream",
"and",
"logged",
".",
"Beware",
"of",
"log",
"loops",
"from",
"logs",
"that",
"write",
"... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/log/LogStream.java#L68-L77 |
100,654 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.getFieldValues | public Enumeration getFieldValues(String name,String separators)
{
return _header.getValues(name,separators);
} | java | public Enumeration getFieldValues(String name,String separators)
{
return _header.getValues(name,separators);
} | [
"public",
"Enumeration",
"getFieldValues",
"(",
"String",
"name",
",",
"String",
"separators",
")",
"{",
"return",
"_header",
".",
"getValues",
"(",
"name",
",",
"separators",
")",
";",
"}"
] | Get a multi valued message field.
Get a field from a message header.
@param name The field name
@param separators String of separators.
@return Enumeration of field values or null | [
"Get",
"a",
"multi",
"valued",
"message",
"field",
".",
"Get",
"a",
"field",
"from",
"a",
"message",
"header",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L252-L255 |
100,655 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.setIntField | public void setIntField(String name, int value)
{
if (_state!=__MSG_EDITABLE)
return;
_header.put(name, TypeUtil.toString(value));
} | java | public void setIntField(String name, int value)
{
if (_state!=__MSG_EDITABLE)
return;
_header.put(name, TypeUtil.toString(value));
} | [
"public",
"void",
"setIntField",
"(",
"String",
"name",
",",
"int",
"value",
")",
"{",
"if",
"(",
"_state",
"!=",
"__MSG_EDITABLE",
")",
"return",
";",
"_header",
".",
"put",
"(",
"name",
",",
"TypeUtil",
".",
"toString",
"(",
"value",
")",
")",
";",
... | Sets the value of an integer field.
Header or Trailer fields are set depending on message state.
@param name the field name
@param value the field integer value | [
"Sets",
"the",
"value",
"of",
"an",
"integer",
"field",
".",
"Header",
"or",
"Trailer",
"fields",
"are",
"set",
"depending",
"on",
"message",
"state",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L333-L338 |
100,656 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.addIntField | public void addIntField(String name, int value)
{
if (_state!=__MSG_EDITABLE)
return;
_header.add(name, TypeUtil.toString(value));
} | java | public void addIntField(String name, int value)
{
if (_state!=__MSG_EDITABLE)
return;
_header.add(name, TypeUtil.toString(value));
} | [
"public",
"void",
"addIntField",
"(",
"String",
"name",
",",
"int",
"value",
")",
"{",
"if",
"(",
"_state",
"!=",
"__MSG_EDITABLE",
")",
"return",
";",
"_header",
".",
"add",
"(",
"name",
",",
"TypeUtil",
".",
"toString",
"(",
"value",
")",
")",
";",
... | Adds the value of an integer field.
Header or Trailer fields are set depending on message state.
@param name the field name
@param value the field integer value | [
"Adds",
"the",
"value",
"of",
"an",
"integer",
"field",
".",
"Header",
"or",
"Trailer",
"fields",
"are",
"set",
"depending",
"on",
"message",
"state",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L346-L351 |
100,657 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.addDateField | public void addDateField(String name, Date date)
{
if (_state!=__MSG_EDITABLE)
return;
_header.addDateField(name,date);
} | java | public void addDateField(String name, Date date)
{
if (_state!=__MSG_EDITABLE)
return;
_header.addDateField(name,date);
} | [
"public",
"void",
"addDateField",
"(",
"String",
"name",
",",
"Date",
"date",
")",
"{",
"if",
"(",
"_state",
"!=",
"__MSG_EDITABLE",
")",
"return",
";",
"_header",
".",
"addDateField",
"(",
"name",
",",
"date",
")",
";",
"}"
] | Adds the value of a date field.
Header or Trailer fields are set depending on message state.
@param name the field name
@param date the field date value | [
"Adds",
"the",
"value",
"of",
"a",
"date",
"field",
".",
"Header",
"or",
"Trailer",
"fields",
"are",
"set",
"depending",
"on",
"message",
"state",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L385-L390 |
100,658 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.setDateField | public void setDateField(String name, long date)
{
if (_state!=__MSG_EDITABLE)
return;
_header.putDateField(name,date);
} | java | public void setDateField(String name, long date)
{
if (_state!=__MSG_EDITABLE)
return;
_header.putDateField(name,date);
} | [
"public",
"void",
"setDateField",
"(",
"String",
"name",
",",
"long",
"date",
")",
"{",
"if",
"(",
"_state",
"!=",
"__MSG_EDITABLE",
")",
"return",
";",
"_header",
".",
"putDateField",
"(",
"name",
",",
"date",
")",
";",
"}"
] | Sets the value of a date field.
Header or Trailer fields are set depending on message state.
@param name the field name
@param date the field date value | [
"Sets",
"the",
"value",
"of",
"a",
"date",
"field",
".",
"Header",
"or",
"Trailer",
"fields",
"are",
"set",
"depending",
"on",
"message",
"state",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L398-L403 |
100,659 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.setVersion | public void setVersion(String version)
{
if (_state!=__MSG_EDITABLE)
throw new IllegalStateException("Not EDITABLE");
if (version.equalsIgnoreCase(__HTTP_1_1))
{
_dotVersion=1;
_version=__HTTP_1_1;
}
else if (version.equalsIgnoreCase(__HTTP... | java | public void setVersion(String version)
{
if (_state!=__MSG_EDITABLE)
throw new IllegalStateException("Not EDITABLE");
if (version.equalsIgnoreCase(__HTTP_1_1))
{
_dotVersion=1;
_version=__HTTP_1_1;
}
else if (version.equalsIgnoreCase(__HTTP... | [
"public",
"void",
"setVersion",
"(",
"String",
"version",
")",
"{",
"if",
"(",
"_state",
"!=",
"__MSG_EDITABLE",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"Not EDITABLE\"",
")",
";",
"if",
"(",
"version",
".",
"equalsIgnoreCase",
"(",
"__HTTP_1_1",
... | Set the request version
@param version the HTTP version string (eg HTTP/1.1)
@exception IllegalStateException message is not EDITABLE | [
"Set",
"the",
"request",
"version"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L442-L463 |
100,660 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.setCharacterEncoding | public void setCharacterEncoding(String encoding,boolean setField)
{
if (isCommitted())
return;
if (encoding==null)
{
// Clear any encoding.
if (_characterEncoding!=null)
{
_characterEncoding=null;
if (s... | java | public void setCharacterEncoding(String encoding,boolean setField)
{
if (isCommitted())
return;
if (encoding==null)
{
// Clear any encoding.
if (_characterEncoding!=null)
{
_characterEncoding=null;
if (s... | [
"public",
"void",
"setCharacterEncoding",
"(",
"String",
"encoding",
",",
"boolean",
"setField",
")",
"{",
"if",
"(",
"isCommitted",
"(",
")",
")",
"return",
";",
"if",
"(",
"encoding",
"==",
"null",
")",
"{",
"// Clear any encoding.",
"if",
"(",
"_character... | Set Character Encoding.
@param encoding An encoding that can override the encoding set
from the ContentType field. | [
"Set",
"Character",
"Encoding",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L506-L532 |
100,661 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.recycle | void recycle(HttpConnection connection)
{
_state=__MSG_EDITABLE;
_version=__HTTP_1_1;
_dotVersion=1;
_header.clear();
_connection=connection;
_characterEncoding=null;
_mimeType=null;
if (_attributes!=null)
_attributes.clear();
} | java | void recycle(HttpConnection connection)
{
_state=__MSG_EDITABLE;
_version=__HTTP_1_1;
_dotVersion=1;
_header.clear();
_connection=connection;
_characterEncoding=null;
_mimeType=null;
if (_attributes!=null)
_attributes.clear();
} | [
"void",
"recycle",
"(",
"HttpConnection",
"connection",
")",
"{",
"_state",
"=",
"__MSG_EDITABLE",
";",
"_version",
"=",
"__HTTP_1_1",
";",
"_dotVersion",
"=",
"1",
";",
"_header",
".",
"clear",
"(",
")",
";",
"_connection",
"=",
"connection",
";",
"_charact... | Recycle the message. | [
"Recycle",
"the",
"message",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L640-L651 |
100,662 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.getAttribute | public Object getAttribute(String name)
{
if (_attributes==null)
return null;
return _attributes.get(name);
} | java | public Object getAttribute(String name)
{
if (_attributes==null)
return null;
return _attributes.get(name);
} | [
"public",
"Object",
"getAttribute",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"_attributes",
"==",
"null",
")",
"return",
"null",
";",
"return",
"_attributes",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Get a request attribute.
@param name Attribute name
@return Attribute value | [
"Get",
"a",
"request",
"attribute",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L720-L725 |
100,663 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.setAttribute | public Object setAttribute(String name, Object attribute)
{
if (_attributes==null)
_attributes=new HashMap(11);
return _attributes.put(name,attribute);
} | java | public Object setAttribute(String name, Object attribute)
{
if (_attributes==null)
_attributes=new HashMap(11);
return _attributes.put(name,attribute);
} | [
"public",
"Object",
"setAttribute",
"(",
"String",
"name",
",",
"Object",
"attribute",
")",
"{",
"if",
"(",
"_attributes",
"==",
"null",
")",
"_attributes",
"=",
"new",
"HashMap",
"(",
"11",
")",
";",
"return",
"_attributes",
".",
"put",
"(",
"name",
","... | Set a request attribute.
@param name Attribute name
@param attribute Attribute value
@return Previous Attribute value | [
"Set",
"a",
"request",
"attribute",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L733-L738 |
100,664 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java | HttpMessage.getAttributeNames | public Enumeration getAttributeNames()
{
if (_attributes==null)
return Collections.enumeration(Collections.EMPTY_LIST);
return Collections.enumeration(_attributes.keySet());
} | java | public Enumeration getAttributeNames()
{
if (_attributes==null)
return Collections.enumeration(Collections.EMPTY_LIST);
return Collections.enumeration(_attributes.keySet());
} | [
"public",
"Enumeration",
"getAttributeNames",
"(",
")",
"{",
"if",
"(",
"_attributes",
"==",
"null",
")",
"return",
"Collections",
".",
"enumeration",
"(",
"Collections",
".",
"EMPTY_LIST",
")",
";",
"return",
"Collections",
".",
"enumeration",
"(",
"_attributes... | Get Attribute names.
@return Enumeration of Strings | [
"Get",
"Attribute",
"names",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpMessage.java#L744-L749 |
100,665 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/Holder.java | Holder.put | public synchronized Object put(Object name,Object value)
{
if (_initParams==null)
_initParams=new HashMap(3);
return _initParams.put(name,value);
} | java | public synchronized Object put(Object name,Object value)
{
if (_initParams==null)
_initParams=new HashMap(3);
return _initParams.put(name,value);
} | [
"public",
"synchronized",
"Object",
"put",
"(",
"Object",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"_initParams",
"==",
"null",
")",
"_initParams",
"=",
"new",
"HashMap",
"(",
"3",
")",
";",
"return",
"_initParams",
".",
"put",
"(",
"name",
... | Map put method.
FilterHolder implements the Map interface as a
configuration conveniance. The methods are mapped to the
filter properties. | [
"Map",
"put",
"method",
".",
"FilterHolder",
"implements",
"the",
"Map",
"interface",
"as",
"a",
"configuration",
"conveniance",
".",
"The",
"methods",
"are",
"mapped",
"to",
"the",
"filter",
"properties",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/Holder.java#L159-L164 |
100,666 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/servlet/Holder.java | Holder.get | public synchronized Object get(Object name)
{
if (_initParams==null)
return null;
return _initParams.get(name);
} | java | public synchronized Object get(Object name)
{
if (_initParams==null)
return null;
return _initParams.get(name);
} | [
"public",
"synchronized",
"Object",
"get",
"(",
"Object",
"name",
")",
"{",
"if",
"(",
"_initParams",
"==",
"null",
")",
"return",
"null",
";",
"return",
"_initParams",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Map get method.
FilterHolder implements the Map interface as a
configuration conveniance. The methods are mapped to the
filter properties. | [
"Map",
"get",
"method",
".",
"FilterHolder",
"implements",
"the",
"Map",
"interface",
"as",
"a",
"configuration",
"conveniance",
".",
"The",
"methods",
"are",
"mapped",
"to",
"the",
"filter",
"properties",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/servlet/Holder.java#L172-L177 |
100,667 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.getFieldNames | public Enumeration getFieldNames()
{
return new Enumeration()
{
int i=0;
Field field=null;
public boolean hasMoreElements()
{
if (field!=null)
return true;
while (i<_f... | java | public Enumeration getFieldNames()
{
return new Enumeration()
{
int i=0;
Field field=null;
public boolean hasMoreElements()
{
if (field!=null)
return true;
while (i<_f... | [
"public",
"Enumeration",
"getFieldNames",
"(",
")",
"{",
"return",
"new",
"Enumeration",
"(",
")",
"{",
"int",
"i",
"=",
"0",
";",
"Field",
"field",
"=",
"null",
";",
"public",
"boolean",
"hasMoreElements",
"(",
")",
"{",
"if",
"(",
"field",
"!=",
"nul... | Get enumeration of header _names.
Returns an enumeration of strings representing the header _names
for this request. | [
"Get",
"enumeration",
"of",
"header",
"_names",
".",
"Returns",
"an",
"enumeration",
"of",
"strings",
"representing",
"the",
"header",
"_names",
"for",
"this",
"request",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L637-L672 |
100,668 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.getIntField | public int getIntField(String name)
throws NumberFormatException
{
String val = valueParameters(get(name),null);
if (val!=null)
return Integer.parseInt(val);
return -1;
} | java | public int getIntField(String name)
throws NumberFormatException
{
String val = valueParameters(get(name),null);
if (val!=null)
return Integer.parseInt(val);
return -1;
} | [
"public",
"int",
"getIntField",
"(",
"String",
"name",
")",
"throws",
"NumberFormatException",
"{",
"String",
"val",
"=",
"valueParameters",
"(",
"get",
"(",
"name",
")",
",",
"null",
")",
";",
"if",
"(",
"val",
"!=",
"null",
")",
"return",
"Integer",
".... | Get a header as an integer value.
Returns the value of an integer field or -1 if not found.
The case of the field name is ignored.
@param name the case-insensitive field name
@exception NumberFormatException If bad integer found | [
"Get",
"a",
"header",
"as",
"an",
"integer",
"value",
".",
"Returns",
"the",
"value",
"of",
"an",
"integer",
"field",
"or",
"-",
"1",
"if",
"not",
"found",
".",
"The",
"case",
"of",
"the",
"field",
"name",
"is",
"ignored",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L959-L966 |
100,669 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.addDateField | public void addDateField(String name, long date)
{
if (_dateBuffer==null)
{
_dateBuffer=new StringBuffer(32);
_calendar=new HttpCal();
}
_dateBuffer.setLength(0);
_calendar.setTimeInMillis(date);
formatDate(_dateBuffer, _calendar, false);
... | java | public void addDateField(String name, long date)
{
if (_dateBuffer==null)
{
_dateBuffer=new StringBuffer(32);
_calendar=new HttpCal();
}
_dateBuffer.setLength(0);
_calendar.setTimeInMillis(date);
formatDate(_dateBuffer, _calendar, false);
... | [
"public",
"void",
"addDateField",
"(",
"String",
"name",
",",
"long",
"date",
")",
"{",
"if",
"(",
"_dateBuffer",
"==",
"null",
")",
"{",
"_dateBuffer",
"=",
"new",
"StringBuffer",
"(",
"32",
")",
";",
"_calendar",
"=",
"new",
"HttpCal",
"(",
")",
";",... | Adds the value of a date field.
@param name the field name
@param date the field date value | [
"Adds",
"the",
"value",
"of",
"a",
"date",
"field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1063-L1074 |
100,670 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.clear | public void clear()
{
_version++;
if (_version>1000)
{
_version=0;
for (int i=_fields.size();i-->0;)
{
Field field=(Field)_fields.get(i);
if (field!=null)
field.clear();
}
}
} | java | public void clear()
{
_version++;
if (_version>1000)
{
_version=0;
for (int i=_fields.size();i-->0;)
{
Field field=(Field)_fields.get(i);
if (field!=null)
field.clear();
}
}
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"_version",
"++",
";",
"if",
"(",
"_version",
">",
"1000",
")",
"{",
"_version",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"_fields",
".",
"size",
"(",
")",
";",
"i",
"--",
">",
"0",
";",
")",
"{",
... | Clear the header. | [
"Clear",
"the",
"header",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1255-L1268 |
100,671 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.destroy | public void destroy()
{
for (int i=_fields.size();i-->0;)
{
Field field=(Field)_fields.get(i);
if (field!=null)
field.destroy();
}
_fields=null;
_index=null;
_dateBuffer=null;
_calendar=null;
_dateReceive=null... | java | public void destroy()
{
for (int i=_fields.size();i-->0;)
{
Field field=(Field)_fields.get(i);
if (field!=null)
field.destroy();
}
_fields=null;
_index=null;
_dateBuffer=null;
_calendar=null;
_dateReceive=null... | [
"public",
"void",
"destroy",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"_fields",
".",
"size",
"(",
")",
";",
"i",
"--",
">",
"0",
";",
")",
"{",
"Field",
"field",
"=",
"(",
"Field",
")",
"_fields",
".",
"get",
"(",
"i",
")",
";",
"if",
"... | Destroy the header.
Help the garbage collector by null everything that we can. | [
"Destroy",
"the",
"header",
".",
"Help",
"the",
"garbage",
"collector",
"by",
"null",
"everything",
"that",
"we",
"can",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1274-L1287 |
100,672 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.addSetCookie | public void addSetCookie(Cookie cookie)
{
String name=cookie.getName();
String value=cookie.getValue();
int version=cookie.getVersion();
// Check arguments
if (name==null || name.length()==0)
throw new IllegalArgumentException("Bad cookie name");
... | java | public void addSetCookie(Cookie cookie)
{
String name=cookie.getName();
String value=cookie.getValue();
int version=cookie.getVersion();
// Check arguments
if (name==null || name.length()==0)
throw new IllegalArgumentException("Bad cookie name");
... | [
"public",
"void",
"addSetCookie",
"(",
"Cookie",
"cookie",
")",
"{",
"String",
"name",
"=",
"cookie",
".",
"getName",
"(",
")",
";",
"String",
"value",
"=",
"cookie",
".",
"getValue",
"(",
")",
";",
"int",
"version",
"=",
"cookie",
".",
"getVersion",
"... | Format a set cookie value
@param cookie The cookie. | [
"Format",
"a",
"set",
"cookie",
"value"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1421-L1501 |
100,673 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java | HttpFields.add | public void add(HttpFields fields)
{
if (fields==null)
return;
Enumeration enm = fields.getFieldNames();
while( enm.hasMoreElements() )
{
String name = (String)enm.nextElement();
Enumeration values = fields.getValues(name);
while(value... | java | public void add(HttpFields fields)
{
if (fields==null)
return;
Enumeration enm = fields.getFieldNames();
while( enm.hasMoreElements() )
{
String name = (String)enm.nextElement();
Enumeration values = fields.getValues(name);
while(value... | [
"public",
"void",
"add",
"(",
"HttpFields",
"fields",
")",
"{",
"if",
"(",
"fields",
"==",
"null",
")",
"return",
";",
"Enumeration",
"enm",
"=",
"fields",
".",
"getFieldNames",
"(",
")",
";",
"while",
"(",
"enm",
".",
"hasMoreElements",
"(",
")",
")",... | Add fields from another HttpFields instance.
Single valued fields are replaced, while all others are added.
@param fields | [
"Add",
"fields",
"from",
"another",
"HttpFields",
"instance",
".",
"Single",
"valued",
"fields",
"are",
"replaced",
"while",
"all",
"others",
"are",
"added",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L1508-L1521 |
100,674 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java | HttpResponse.readHeader | public void readHeader(HttpInputStream in)
throws IOException
{
_state=__MSG_BAD;
log.warn(LogSupport.NOT_IMPLEMENTED);
} | java | public void readHeader(HttpInputStream in)
throws IOException
{
_state=__MSG_BAD;
log.warn(LogSupport.NOT_IMPLEMENTED);
} | [
"public",
"void",
"readHeader",
"(",
"HttpInputStream",
"in",
")",
"throws",
"IOException",
"{",
"_state",
"=",
"__MSG_BAD",
";",
"log",
".",
"warn",
"(",
"LogSupport",
".",
"NOT_IMPLEMENTED",
")",
";",
"}"
] | Not Implemented.
@param in
@exception IOException | [
"Not",
"Implemented",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java#L253-L258 |
100,675 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java | HttpResponse.sendError | public void sendError(int code,String message)
throws IOException
{
setStatus(code,message);
// Generate normal error page.
HttpRequest request=getHttpRequest();
// If we are allowed to have a body
if (code!=__204_No_Content &&
... | java | public void sendError(int code,String message)
throws IOException
{
setStatus(code,message);
// Generate normal error page.
HttpRequest request=getHttpRequest();
// If we are allowed to have a body
if (code!=__204_No_Content &&
... | [
"public",
"void",
"sendError",
"(",
"int",
"code",
",",
"String",
"message",
")",
"throws",
"IOException",
"{",
"setStatus",
"(",
"code",
",",
"message",
")",
";",
"// Generate normal error page.",
"HttpRequest",
"request",
"=",
"getHttpRequest",
"(",
")",
";",
... | Send Error Response. | [
"Send",
"Error",
"Response",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java#L337-L368 |
100,676 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java | HttpResponse.addSetCookie | public void addSetCookie(String name,
String value)
{
_header.addSetCookie(new Cookie(name,value));
} | java | public void addSetCookie(String name,
String value)
{
_header.addSetCookie(new Cookie(name,value));
} | [
"public",
"void",
"addSetCookie",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"_header",
".",
"addSetCookie",
"(",
"new",
"Cookie",
"(",
"name",
",",
"value",
")",
")",
";",
"}"
] | Add a Set-Cookie field. | [
"Add",
"a",
"Set",
"-",
"Cookie",
"field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java#L405-L409 |
100,677 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java | HttpResponse.recycle | void recycle(HttpConnection connection)
{
super.recycle(connection);
_status=__200_OK;
_reason=null;
_httpContext=null;
} | java | void recycle(HttpConnection connection)
{
super.recycle(connection);
_status=__200_OK;
_reason=null;
_httpContext=null;
} | [
"void",
"recycle",
"(",
"HttpConnection",
"connection",
")",
"{",
"super",
".",
"recycle",
"(",
"connection",
")",
";",
"_status",
"=",
"__200_OK",
";",
"_reason",
"=",
"null",
";",
"_httpContext",
"=",
"null",
";",
"}"
] | Recycle the response. | [
"Recycle",
"the",
"response",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpResponse.java#L441-L447 |
100,678 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/Server.java | Server.configure | public void configure(String configuration)
throws IOException
{
URL url=Resource.newResource(configuration).getURL();
if (_configuration!=null && _configuration.equals(url.toString()))
return;
if (_configuration!=null)
throw new IllegalStateException("Alread... | java | public void configure(String configuration)
throws IOException
{
URL url=Resource.newResource(configuration).getURL();
if (_configuration!=null && _configuration.equals(url.toString()))
return;
if (_configuration!=null)
throw new IllegalStateException("Alread... | [
"public",
"void",
"configure",
"(",
"String",
"configuration",
")",
"throws",
"IOException",
"{",
"URL",
"url",
"=",
"Resource",
".",
"newResource",
"(",
"configuration",
")",
".",
"getURL",
"(",
")",
";",
"if",
"(",
"_configuration",
"!=",
"null",
"&&",
"... | Configure the server from an XML file.
@param configuration The filename or URL of the XML
configuration file. | [
"Configure",
"the",
"server",
"from",
"an",
"XML",
"file",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/Server.java#L166-L190 |
100,679 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/jetty/Server.java | Server.setWebApplicationConfigurationClassNames | public void setWebApplicationConfigurationClassNames (String[] configurationClassNames)
{
if (configurationClassNames != null)
{
_webAppConfigurationClassNames = new String[configurationClassNames.length];
System.arraycopy(configurationClassNames, 0, _webAppConfigurationClass... | java | public void setWebApplicationConfigurationClassNames (String[] configurationClassNames)
{
if (configurationClassNames != null)
{
_webAppConfigurationClassNames = new String[configurationClassNames.length];
System.arraycopy(configurationClassNames, 0, _webAppConfigurationClass... | [
"public",
"void",
"setWebApplicationConfigurationClassNames",
"(",
"String",
"[",
"]",
"configurationClassNames",
")",
"{",
"if",
"(",
"configurationClassNames",
"!=",
"null",
")",
"{",
"_webAppConfigurationClassNames",
"=",
"new",
"String",
"[",
"configurationClassNames"... | setWebApplicationConfigurationClasses
Set up the list of classnames of WebApplicationContext.Configuration
implementations that will be applied to configure every webapp.
The list can be overridden by individual WebApplicationContexts.
@param configurationClasses | [
"setWebApplicationConfigurationClasses",
"Set",
"up",
"the",
"list",
"of",
"classnames",
"of",
"WebApplicationContext",
".",
"Configuration",
"implementations",
"that",
"will",
"be",
"applied",
"to",
"configure",
"every",
"webapp",
".",
"The",
"list",
"can",
"be",
"... | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/jetty/Server.java#L424-L431 |
100,680 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addText | public void addText(String label,
String value)
{
Composite c = new Composite();
c.add(value);
addField(label,c);
} | java | public void addText(String label,
String value)
{
Composite c = new Composite();
c.add(value);
addField(label,c);
} | [
"public",
"void",
"addText",
"(",
"String",
"label",
",",
"String",
"value",
")",
"{",
"Composite",
"c",
"=",
"new",
"Composite",
"(",
")",
";",
"c",
".",
"add",
"(",
"value",
")",
";",
"addField",
"(",
"label",
",",
"c",
")",
";",
"}"
] | Add an informational section. | [
"Add",
"an",
"informational",
"section",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L55-L61 |
100,681 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addTextField | public Input addTextField(String tag,
String label,
int length,
String value)
{
Input i = new Input(Input.Text,tag,value);
i.setSize(length);
addField(label,i);
return i;
} | java | public Input addTextField(String tag,
String label,
int length,
String value)
{
Input i = new Input(Input.Text,tag,value);
i.setSize(length);
addField(label,i);
return i;
} | [
"public",
"Input",
"addTextField",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"int",
"length",
",",
"String",
"value",
")",
"{",
"Input",
"i",
"=",
"new",
"Input",
"(",
"Input",
".",
"Text",
",",
"tag",
",",
"value",
")",
";",
"i",
".",
"se... | Add a Text Entry Field.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"Text",
"Entry",
"Field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L68-L77 |
100,682 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addTextArea | public TextArea addTextArea(String tag,
String label,
int width,
int height,
String value)
{
TextArea ta = new TextArea(tag,value);
ta.setSize(width,height);
addFi... | java | public TextArea addTextArea(String tag,
String label,
int width,
int height,
String value)
{
TextArea ta = new TextArea(tag,value);
ta.setSize(width,height);
addFi... | [
"public",
"TextArea",
"addTextArea",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"int",
"width",
",",
"int",
"height",
",",
"String",
"value",
")",
"{",
"TextArea",
"ta",
"=",
"new",
"TextArea",
"(",
"tag",
",",
"value",
")",
";",
"ta",
".",
"... | Add a Text Area.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"Text",
"Area",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L84-L94 |
100,683 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addFileField | public Input addFileField(String tag,
String label)
{
Input i = new Input(Input.File,tag);
addField(label,i);
return i;
} | java | public Input addFileField(String tag,
String label)
{
Input i = new Input(Input.File,tag);
addField(label,i);
return i;
} | [
"public",
"Input",
"addFileField",
"(",
"String",
"tag",
",",
"String",
"label",
")",
"{",
"Input",
"i",
"=",
"new",
"Input",
"(",
"Input",
".",
"File",
",",
"tag",
")",
";",
"addField",
"(",
"label",
",",
"i",
")",
";",
"return",
"i",
";",
"}"
] | Add a File Entry Field.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"File",
"Entry",
"Field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L101-L107 |
100,684 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addInfoField | public void addInfoField(String tag,
String label,
String value)
{
addText(label,value);
addHiddenField(tag,value);
} | java | public void addInfoField(String tag,
String label,
String value)
{
addText(label,value);
addHiddenField(tag,value);
} | [
"public",
"void",
"addInfoField",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"String",
"value",
")",
"{",
"addText",
"(",
"label",
",",
"value",
")",
";",
"addHiddenField",
"(",
"tag",
",",
"value",
")",
";",
"}"
] | Add an informational field which also passes the data as hidden.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"an",
"informational",
"field",
"which",
"also",
"passes",
"the",
"data",
"as",
"hidden",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L114-L120 |
100,685 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addHiddenField | public void addHiddenField(String tag,
String value)
{
Element e = new Input(Input.Hidden,tag,value);
hidden.add(e);
} | java | public void addHiddenField(String tag,
String value)
{
Element e = new Input(Input.Hidden,tag,value);
hidden.add(e);
} | [
"public",
"void",
"addHiddenField",
"(",
"String",
"tag",
",",
"String",
"value",
")",
"{",
"Element",
"e",
"=",
"new",
"Input",
"(",
"Input",
".",
"Hidden",
",",
"tag",
",",
"value",
")",
";",
"hidden",
".",
"add",
"(",
"e",
")",
";",
"}"
] | Add a hidden field.
@param tag The form name of the element | [
"Add",
"a",
"hidden",
"field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L126-L131 |
100,686 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addPassword | public void addPassword(String tag,
String label,
int length)
{
Input i = new Input(Input.Password,tag);
i.setSize(length);
addField(label,i);
} | java | public void addPassword(String tag,
String label,
int length)
{
Input i = new Input(Input.Password,tag);
i.setSize(length);
addField(label,i);
} | [
"public",
"void",
"addPassword",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"int",
"length",
")",
"{",
"Input",
"i",
"=",
"new",
"Input",
"(",
"Input",
".",
"Password",
",",
"tag",
")",
";",
"i",
".",
"setSize",
"(",
"length",
")",
";",
"ad... | Add a password field.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"password",
"field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L138-L145 |
100,687 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addSelect | public Select addSelect(String tag,
String label,
boolean multiple,
int size)
{
Select s = new Select(tag,multiple);
s.setSize(size);
addField(label,s);
return s;
} | java | public Select addSelect(String tag,
String label,
boolean multiple,
int size)
{
Select s = new Select(tag,multiple);
s.setSize(size);
addField(label,s);
return s;
} | [
"public",
"Select",
"addSelect",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"boolean",
"multiple",
",",
"int",
"size",
")",
"{",
"Select",
"s",
"=",
"new",
"Select",
"(",
"tag",
",",
"multiple",
")",
";",
"s",
".",
"setSize",
"(",
"size",
")"... | Add a Select field.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"Select",
"field",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L167-L176 |
100,688 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addSelect | public Select addSelect(String tag,
String label,
boolean multiple,
int size,
Enumeration values)
{
Select s = addSelect(tag,label,multiple,size);
s.setSize(size);
while (values.ha... | java | public Select addSelect(String tag,
String label,
boolean multiple,
int size,
Enumeration values)
{
Select s = addSelect(tag,label,multiple,size);
s.setSize(size);
while (values.ha... | [
"public",
"Select",
"addSelect",
"(",
"String",
"tag",
",",
"String",
"label",
",",
"boolean",
"multiple",
",",
"int",
"size",
",",
"Enumeration",
"values",
")",
"{",
"Select",
"s",
"=",
"addSelect",
"(",
"tag",
",",
"label",
",",
"multiple",
",",
"size"... | Add a Select field initialised with fields.
@param tag The form name of the element
@param label The label for the element in the table. | [
"Add",
"a",
"Select",
"field",
"initialised",
"with",
"fields",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L183-L194 |
100,689 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addButton | public Input addButton(String tag,
String label)
{
if (buttons==null)
buttonsAtBottom();
Input e = new Input(Input.Submit,tag,label);
if (extendRow)
addField(null,e);
else
buttons.add(e);
return e;
} | java | public Input addButton(String tag,
String label)
{
if (buttons==null)
buttonsAtBottom();
Input e = new Input(Input.Submit,tag,label);
if (extendRow)
addField(null,e);
else
buttons.add(e);
return e;
} | [
"public",
"Input",
"addButton",
"(",
"String",
"tag",
",",
"String",
"label",
")",
"{",
"if",
"(",
"buttons",
"==",
"null",
")",
"buttonsAtBottom",
"(",
")",
";",
"Input",
"e",
"=",
"new",
"Input",
"(",
"Input",
".",
"Submit",
",",
"tag",
",",
"label... | Add a Submit Button.
@param tag The form name of the element
@param label The label for the Button | [
"Add",
"a",
"Submit",
"Button",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L263-L275 |
100,690 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addReset | public void addReset(String label)
{
if (buttons==null)
buttonsAtBottom();
Element e = new Input(Input.Reset,"Reset",label);
if (extendRow)
addField(null,e);
else
buttons.add(e);
} | java | public void addReset(String label)
{
if (buttons==null)
buttonsAtBottom();
Element e = new Input(Input.Reset,"Reset",label);
if (extendRow)
addField(null,e);
else
buttons.add(e);
} | [
"public",
"void",
"addReset",
"(",
"String",
"label",
")",
"{",
"if",
"(",
"buttons",
"==",
"null",
")",
"buttonsAtBottom",
"(",
")",
";",
"Element",
"e",
"=",
"new",
"Input",
"(",
"Input",
".",
"Reset",
",",
"\"Reset\"",
",",
"label",
")",
";",
"if"... | Add a reset button.
@param label The label for the element in the table. | [
"Add",
"a",
"reset",
"button",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L281-L290 |
100,691 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addField | public void addField(String label,Element field)
{
if (label==null)
label=" ";
else
label="<b>"+label+":</b>";
if (extendRow)
{
column.add(field);
extendRow=false;
}
else
{
column.newRow();
... | java | public void addField(String label,Element field)
{
if (label==null)
label=" ";
else
label="<b>"+label+":</b>";
if (extendRow)
{
column.add(field);
extendRow=false;
}
else
{
column.newRow();
... | [
"public",
"void",
"addField",
"(",
"String",
"label",
",",
"Element",
"field",
")",
"{",
"if",
"(",
"label",
"==",
"null",
")",
"label",
"=",
"\" \"",
";",
"else",
"label",
"=",
"\"<b>\"",
"+",
"label",
"+",
"\":</b>\"",
";",
"if",
"(",
"extendRow... | Add an arbitrary element to the table.
@param label The label for the element in the table. | [
"Add",
"an",
"arbitrary",
"element",
"to",
"the",
"table",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L327-L353 |
100,692 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.addColumn | public void addColumn(int spacing)
{
table.addCell(" ","width="+spacing);
column = new Table(0);
table.addCell(column);
table.cell().top();
columns++;
} | java | public void addColumn(int spacing)
{
table.addCell(" ","width="+spacing);
column = new Table(0);
table.addCell(column);
table.cell().top();
columns++;
} | [
"public",
"void",
"addColumn",
"(",
"int",
"spacing",
")",
"{",
"table",
".",
"addCell",
"(",
"\" \"",
",",
"\"width=\"",
"+",
"spacing",
")",
";",
"column",
"=",
"new",
"Table",
"(",
"0",
")",
";",
"table",
".",
"addCell",
"(",
"column",
")",
";... | Create a new column in the form. | [
"Create",
"a",
"new",
"column",
"in",
"the",
"form",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L368-L375 |
100,693 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.newColumns | public void newColumns()
{
column = new Table(0);
columns = 1;
table.newRow();
table.addCell(column);
table.cell().top();
} | java | public void newColumns()
{
column = new Table(0);
columns = 1;
table.newRow();
table.addCell(column);
table.cell().top();
} | [
"public",
"void",
"newColumns",
"(",
")",
"{",
"column",
"=",
"new",
"Table",
"(",
"0",
")",
";",
"columns",
"=",
"1",
";",
"table",
".",
"newRow",
"(",
")",
";",
"table",
".",
"addCell",
"(",
"column",
")",
";",
"table",
".",
"cell",
"(",
")",
... | Add a new sections of columns. | [
"Add",
"a",
"new",
"sections",
"of",
"columns",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L380-L387 |
100,694 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/html/TableForm.java | TableForm.newTable | public void newTable()
{
table = new Table(0);
column = new Table(0);
columns = 1;
super.add(table);
table.newRow();
table.addCell(column).top();
} | java | public void newTable()
{
table = new Table(0);
column = new Table(0);
columns = 1;
super.add(table);
table.newRow();
table.addCell(column).top();
} | [
"public",
"void",
"newTable",
"(",
")",
"{",
"table",
"=",
"new",
"Table",
"(",
"0",
")",
";",
"column",
"=",
"new",
"Table",
"(",
"0",
")",
";",
"columns",
"=",
"1",
";",
"super",
".",
"add",
"(",
"table",
")",
";",
"table",
".",
"newRow",
"("... | Start using a new Table.
Anything added to the Composite parent of
this object before this is called will be added between the two
tables. | [
"Start",
"using",
"a",
"new",
"Table",
".",
"Anything",
"added",
"to",
"the",
"Composite",
"parent",
"of",
"this",
"object",
"before",
"this",
"is",
"called",
"will",
"be",
"added",
"between",
"the",
"two",
"tables",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/html/TableForm.java#L406-L414 |
100,695 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/http/SimulatedSocketFactory.java | SimulatedSocketFactory.isSecure | @Override
public final boolean isSecure(Socket sock)
throws IllegalArgumentException {
if (sock == null) {
throw new IllegalArgumentException("Socket may not be null.");
}
// This check is performed last since it calls a method implemented
// by the argument ... | java | @Override
public final boolean isSecure(Socket sock)
throws IllegalArgumentException {
if (sock == null) {
throw new IllegalArgumentException("Socket may not be null.");
}
// This check is performed last since it calls a method implemented
// by the argument ... | [
"@",
"Override",
"public",
"final",
"boolean",
"isSecure",
"(",
"Socket",
"sock",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"sock",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Socket may not be null.\"",
")",
";",
... | Checks whether a socket connection is secure. This factory creates plain socket connections which are not
considered secure.
@param sock the connected socket
@return <code>false</code>
@throws IllegalArgumentException if the argument is invalid | [
"Checks",
"whether",
"a",
"socket",
"connection",
"is",
"secure",
".",
"This",
"factory",
"creates",
"plain",
"socket",
"connections",
"which",
"are",
"not",
"considered",
"secure",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/http/SimulatedSocketFactory.java#L200-L213 |
100,696 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/URLResource.java | URLResource.release | public synchronized void release()
{
if (_in!=null)
{
try{_in.close();}catch(IOException e){LogSupport.ignore(log,e);}
_in=null;
}
if (_connection!=null)
_connection=null;
} | java | public synchronized void release()
{
if (_in!=null)
{
try{_in.close();}catch(IOException e){LogSupport.ignore(log,e);}
_in=null;
}
if (_connection!=null)
_connection=null;
} | [
"public",
"synchronized",
"void",
"release",
"(",
")",
"{",
"if",
"(",
"_in",
"!=",
"null",
")",
"{",
"try",
"{",
"_in",
".",
"close",
"(",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"LogSupport",
".",
"ignore",
"(",
"log",
",",
"... | Release any resources held by the resource. | [
"Release",
"any",
"resources",
"held",
"by",
"the",
"resource",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/URLResource.java#L72-L82 |
100,697 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/URLResource.java | URLResource.exists | public boolean exists()
{
try
{
synchronized(this)
{
if (checkConnection() && _in==null )
_in = _connection.getInputStream();
}
}
catch (IOException e)
{
LogSupport.ignore(log,e);
}
... | java | public boolean exists()
{
try
{
synchronized(this)
{
if (checkConnection() && _in==null )
_in = _connection.getInputStream();
}
}
catch (IOException e)
{
LogSupport.ignore(log,e);
}
... | [
"public",
"boolean",
"exists",
"(",
")",
"{",
"try",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"checkConnection",
"(",
")",
"&&",
"_in",
"==",
"null",
")",
"_in",
"=",
"_connection",
".",
"getInputStream",
"(",
")",
";",
"}",
"}",
"catch... | Returns true if the respresened resource exists. | [
"Returns",
"true",
"if",
"the",
"respresened",
"resource",
"exists",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/URLResource.java#L88-L103 |
100,698 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/URLResource.java | URLResource.getFile | public File getFile()
throws IOException
{
// Try the permission hack
if (checkConnection())
{
Permission perm = _connection.getPermission();
if (perm instanceof java.io.FilePermission)
return new File(perm.getName());
}
// Try... | java | public File getFile()
throws IOException
{
// Try the permission hack
if (checkConnection())
{
Permission perm = _connection.getPermission();
if (perm instanceof java.io.FilePermission)
return new File(perm.getName());
}
// Try... | [
"public",
"File",
"getFile",
"(",
")",
"throws",
"IOException",
"{",
"// Try the permission hack",
"if",
"(",
"checkConnection",
"(",
")",
")",
"{",
"Permission",
"perm",
"=",
"_connection",
".",
"getPermission",
"(",
")",
";",
"if",
"(",
"perm",
"instanceof",... | Returns an File representing the given resource or NULL if this
is not possible. | [
"Returns",
"an",
"File",
"representing",
"the",
"given",
"resource",
"or",
"NULL",
"if",
"this",
"is",
"not",
"possible",
"."
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/URLResource.java#L154-L171 |
100,699 | webmetrics/browsermob-proxy | src/main/java/org/browsermob/proxy/jetty/util/URLResource.java | URLResource.getInputStream | public synchronized InputStream getInputStream()
throws java.io.IOException
{
if (!checkConnection())
throw new IOException( "Invalid resource");
try
{
if( _in != null)
{
InputStream in = _in;
_in=null;
... | java | public synchronized InputStream getInputStream()
throws java.io.IOException
{
if (!checkConnection())
throw new IOException( "Invalid resource");
try
{
if( _in != null)
{
InputStream in = _in;
_in=null;
... | [
"public",
"synchronized",
"InputStream",
"getInputStream",
"(",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"if",
"(",
"!",
"checkConnection",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"\"Invalid resource\"",
")",
";",
"try",
"{",
"if... | Returns an input stream to the resource | [
"Returns",
"an",
"input",
"stream",
"to",
"the",
"resource"
] | a9252e62246ac33d55d51b993ba1159404e7d389 | https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/util/URLResource.java#L186-L206 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.