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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35,600 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.fireStartDoc | protected void fireStartDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTDOCUMENT);
}
} | java | protected void fireStartDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTDOCUMENT);
}
} | [
"protected",
"void",
"fireStartDoc",
"(",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"if",
"(",
"m_tracer",
"!=",
"null",
")",
"{",
"flushMyWriter",
"(",
")",
";",
"m_tracer",
".",
"fireGenerateEvent",
"(",
"SerializerTrace",
"... | To fire off start document trace event | [
"To",
"fire",
"off",
"start",
"document",
"trace",
"event"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1087-L1095 |
35,601 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.fireEndDoc | protected void fireEndDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDDOCUMENT);
}
} | java | protected void fireEndDoc()
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDDOCUMENT);
}
} | [
"protected",
"void",
"fireEndDoc",
"(",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"if",
"(",
"m_tracer",
"!=",
"null",
")",
"{",
"flushMyWriter",
"(",
")",
";",
"m_tracer",
".",
"fireGenerateEvent",
"(",
"SerializerTrace",
"."... | To fire off end document trace event | [
"To",
"fire",
"off",
"end",
"document",
"trace",
"event"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1101-L1109 |
35,602 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.fireStartElem | protected void fireStartElem(String elemName)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT,
elemName, m_attributes);
}
} | java | protected void fireStartElem(String elemName)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT,
elemName, m_attributes);
}
} | [
"protected",
"void",
"fireStartElem",
"(",
"String",
"elemName",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"if",
"(",
"m_tracer",
"!=",
"null",
")",
"{",
"flushMyWriter",
"(",
")",
";",
"m_tracer",
".",
"fireGenerateEvent",
"(... | Report the start element trace event. This trace method needs to be
called just before the attributes are cleared.
@param elemName the qualified name of the element | [
"Report",
"the",
"start",
"element",
"trace",
"event",
".",
"This",
"trace",
"method",
"needs",
"to",
"be",
"called",
"just",
"before",
"the",
"attributes",
"are",
"cleared",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1118-L1127 |
35,603 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.fireEscapingEvent | protected void fireEscapingEvent(String name, String data)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_PI,name, data);
}
} | java | protected void fireEscapingEvent(String name, String data)
throws org.xml.sax.SAXException
{
if (m_tracer != null)
{
flushMyWriter();
m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_PI,name, data);
}
} | [
"protected",
"void",
"fireEscapingEvent",
"(",
"String",
"name",
",",
"String",
"data",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"if",
"(",
"m_tracer",
"!=",
"null",
")",
"{",
"flushMyWriter",
"(",
")",
";",
"m_tracer",
"."... | To fire off the PI trace event
@param name Name of PI | [
"To",
"fire",
"off",
"the",
"PI",
"trace",
"event"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1146-L1155 |
35,604 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.resetSerializerBase | private void resetSerializerBase()
{
this.m_attributes.clear();
this.m_CdataElems = null;
this.m_cdataTagOpen = false;
this.m_docIsEmpty = true;
this.m_doctypePublic = null;
this.m_doctypeSystem = null;
this.m_doIndent = false;
this.m_elemContext = new ElemContext... | java | private void resetSerializerBase()
{
this.m_attributes.clear();
this.m_CdataElems = null;
this.m_cdataTagOpen = false;
this.m_docIsEmpty = true;
this.m_doctypePublic = null;
this.m_doctypeSystem = null;
this.m_doIndent = false;
this.m_elemContext = new ElemContext... | [
"private",
"void",
"resetSerializerBase",
"(",
")",
"{",
"this",
".",
"m_attributes",
".",
"clear",
"(",
")",
";",
"this",
".",
"m_CdataElems",
"=",
"null",
";",
"this",
".",
"m_cdataTagOpen",
"=",
"false",
";",
"this",
".",
"m_docIsEmpty",
"=",
"true",
... | Reset all of the fields owned by SerializerBase | [
"Reset",
"all",
"of",
"the",
"fields",
"owned",
"by",
"SerializerBase"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1249-L1281 |
35,605 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.getElementURI | private String getElementURI() {
String uri = null;
// At this point in processing we have received all the
// namespace mappings
// As we still don't know the elements namespace,
// we now figure it out.
String prefix = getPrefixPart(m_elemContext.m_elementName);
... | java | private String getElementURI() {
String uri = null;
// At this point in processing we have received all the
// namespace mappings
// As we still don't know the elements namespace,
// we now figure it out.
String prefix = getPrefixPart(m_elemContext.m_elementName);
... | [
"private",
"String",
"getElementURI",
"(",
")",
"{",
"String",
"uri",
"=",
"null",
";",
"// At this point in processing we have received all the",
"// namespace mappings",
"// As we still don't know the elements namespace,",
"// we now figure it out.",
"String",
"prefix",
"=",
"g... | Before this call m_elementContext.m_elementURI is null,
which means it is not yet known. After this call it
is non-null, but possibly "" meaning that it is in the
default namespace.
@return The URI of the element, never null, but possibly "". | [
"Before",
"this",
"call",
"m_elementContext",
".",
"m_elementURI",
"is",
"null",
"which",
"means",
"it",
"is",
"not",
"yet",
"known",
".",
"After",
"this",
"call",
"it",
"is",
"non",
"-",
"null",
"but",
"possibly",
"meaning",
"that",
"it",
"is",
"in",
"t... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1519-L1543 |
35,606 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.getOutputProperty | public String getOutputProperty(String name) {
String val = getOutputPropertyNonDefault(name);
// If no explicit value, try to get the default value
if (val == null)
val = getOutputPropertyDefault(name);
return val;
} | java | public String getOutputProperty(String name) {
String val = getOutputPropertyNonDefault(name);
// If no explicit value, try to get the default value
if (val == null)
val = getOutputPropertyDefault(name);
return val;
} | [
"public",
"String",
"getOutputProperty",
"(",
"String",
"name",
")",
"{",
"String",
"val",
"=",
"getOutputPropertyNonDefault",
"(",
"name",
")",
";",
"// If no explicit value, try to get the default value",
"if",
"(",
"val",
"==",
"null",
")",
"val",
"=",
"getOutput... | Get the value of an output property,
the explicit value, if any, otherwise the
default value, if any, otherwise null. | [
"Get",
"the",
"value",
"of",
"an",
"output",
"property",
"the",
"explicit",
"value",
"if",
"any",
"otherwise",
"the",
"default",
"value",
"if",
"any",
"otherwise",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1551-L1558 |
35,607 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java | SerializerBase.getFirstCharLocName | static char getFirstCharLocName(String name) {
final char first;
int i = name.indexOf('}');
if (i < 0)
first = name.charAt(0);
else
first = name.charAt(i+1);
return first;
} | java | static char getFirstCharLocName(String name) {
final char first;
int i = name.indexOf('}');
if (i < 0)
first = name.charAt(0);
else
first = name.charAt(i+1);
return first;
} | [
"static",
"char",
"getFirstCharLocName",
"(",
"String",
"name",
")",
"{",
"final",
"char",
"first",
";",
"int",
"i",
"=",
"name",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"i",
"<",
"0",
")",
"first",
"=",
"name",
".",
"charAt",
"(",
"0... | Get the first char of the local name
@param name Either a local name, or a local name
preceeded by a uri enclosed in curly braces. | [
"Get",
"the",
"first",
"char",
"of",
"the",
"local",
"name"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/SerializerBase.java#L1688-L1696 |
35,608 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java | Functionizer.makeFunction | private FunctionDeclaration makeFunction(MethodDeclaration method) {
ExecutableElement elem = method.getExecutableElement();
TypeElement declaringClass = ElementUtil.getDeclaringClass(elem);
boolean isInstanceMethod = !ElementUtil.isStatic(elem) && !ElementUtil.isConstructor(elem);
FunctionDeclaration ... | java | private FunctionDeclaration makeFunction(MethodDeclaration method) {
ExecutableElement elem = method.getExecutableElement();
TypeElement declaringClass = ElementUtil.getDeclaringClass(elem);
boolean isInstanceMethod = !ElementUtil.isStatic(elem) && !ElementUtil.isConstructor(elem);
FunctionDeclaration ... | [
"private",
"FunctionDeclaration",
"makeFunction",
"(",
"MethodDeclaration",
"method",
")",
"{",
"ExecutableElement",
"elem",
"=",
"method",
".",
"getExecutableElement",
"(",
")",
";",
"TypeElement",
"declaringClass",
"=",
"ElementUtil",
".",
"getDeclaringClass",
"(",
... | Create an equivalent function declaration for a given method. | [
"Create",
"an",
"equivalent",
"function",
"declaration",
"for",
"a",
"given",
"method",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java#L408-L451 |
35,609 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java | Functionizer.makeAllocatingConstructor | private FunctionDeclaration makeAllocatingConstructor(
MethodDeclaration method, boolean releasing) {
assert method.isConstructor();
ExecutableElement element = method.getExecutableElement();
TypeElement declaringClass = ElementUtil.getDeclaringClass(element);
String name = releasing ? nameTable.... | java | private FunctionDeclaration makeAllocatingConstructor(
MethodDeclaration method, boolean releasing) {
assert method.isConstructor();
ExecutableElement element = method.getExecutableElement();
TypeElement declaringClass = ElementUtil.getDeclaringClass(element);
String name = releasing ? nameTable.... | [
"private",
"FunctionDeclaration",
"makeAllocatingConstructor",
"(",
"MethodDeclaration",
"method",
",",
"boolean",
"releasing",
")",
"{",
"assert",
"method",
".",
"isConstructor",
"(",
")",
";",
"ExecutableElement",
"element",
"=",
"method",
".",
"getExecutableElement",... | Create a wrapper for a constructor that does the object allocation. | [
"Create",
"a",
"wrapper",
"for",
"a",
"constructor",
"that",
"does",
"the",
"object",
"allocation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java#L456-L482 |
35,610 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java | Functionizer.setFunctionCaller | private void setFunctionCaller(MethodDeclaration method, ExecutableElement methodElement) {
TypeMirror returnType = methodElement.getReturnType();
TypeElement declaringClass = ElementUtil.getDeclaringClass(methodElement);
Block body = new Block();
method.setBody(body);
method.removeModifiers(Modifie... | java | private void setFunctionCaller(MethodDeclaration method, ExecutableElement methodElement) {
TypeMirror returnType = methodElement.getReturnType();
TypeElement declaringClass = ElementUtil.getDeclaringClass(methodElement);
Block body = new Block();
method.setBody(body);
method.removeModifiers(Modifie... | [
"private",
"void",
"setFunctionCaller",
"(",
"MethodDeclaration",
"method",
",",
"ExecutableElement",
"methodElement",
")",
"{",
"TypeMirror",
"returnType",
"=",
"methodElement",
".",
"getReturnType",
"(",
")",
";",
"TypeElement",
"declaringClass",
"=",
"ElementUtil",
... | Replace method block statements with single statement that invokes function. | [
"Replace",
"method",
"block",
"statements",
"with",
"single",
"statement",
"that",
"invokes",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java#L487-L511 |
35,611 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java | Functionizer.addDisallowedConstructors | private void addDisallowedConstructors(TypeDeclaration node) {
TypeElement typeElement = node.getTypeElement();
TypeElement superClass = ElementUtil.getSuperclass(typeElement);
if (ElementUtil.isPrivateInnerType(typeElement) || ElementUtil.isAbstract(typeElement)
|| superClass == null
// If ... | java | private void addDisallowedConstructors(TypeDeclaration node) {
TypeElement typeElement = node.getTypeElement();
TypeElement superClass = ElementUtil.getSuperclass(typeElement);
if (ElementUtil.isPrivateInnerType(typeElement) || ElementUtil.isAbstract(typeElement)
|| superClass == null
// If ... | [
"private",
"void",
"addDisallowedConstructors",
"(",
"TypeDeclaration",
"node",
")",
"{",
"TypeElement",
"typeElement",
"=",
"node",
".",
"getTypeElement",
"(",
")",
";",
"TypeElement",
"superClass",
"=",
"ElementUtil",
".",
"getSuperclass",
"(",
"typeElement",
")",... | Declare any inherited constructors that aren't allowed to be accessed in Java
with a NS_UNAVAILABLE macro, so that clang will flag such access from native
code as an error. | [
"Declare",
"any",
"inherited",
"constructors",
"that",
"aren",
"t",
"allowed",
"to",
"be",
"accessed",
"in",
"Java",
"with",
"a",
"NS_UNAVAILABLE",
"macro",
"so",
"that",
"clang",
"will",
"flag",
"such",
"access",
"from",
"native",
"code",
"as",
"an",
"error... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Functionizer.java#L525-L569 |
35,612 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java | OuterReferenceResolver.findScopeForType | private Scope findScopeForType(TypeElement type) {
Scope scope = peekScope();
while (scope != null) {
if (scope.kind != ScopeKind.METHOD && type.equals(scope.type)) {
return scope;
}
scope = scope.outer;
}
return null;
} | java | private Scope findScopeForType(TypeElement type) {
Scope scope = peekScope();
while (scope != null) {
if (scope.kind != ScopeKind.METHOD && type.equals(scope.type)) {
return scope;
}
scope = scope.outer;
}
return null;
} | [
"private",
"Scope",
"findScopeForType",
"(",
"TypeElement",
"type",
")",
"{",
"Scope",
"scope",
"=",
"peekScope",
"(",
")",
";",
"while",
"(",
"scope",
"!=",
"null",
")",
"{",
"if",
"(",
"scope",
".",
"kind",
"!=",
"ScopeKind",
".",
"METHOD",
"&&",
"ty... | Finds the non-method scope for the given type. | [
"Finds",
"the",
"non",
"-",
"method",
"scope",
"for",
"the",
"given",
"type",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java#L166-L175 |
35,613 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java | OuterReferenceResolver.whenNeedsOuterParam | private void whenNeedsOuterParam(TypeElement type, Runnable runnable) {
if (captureInfo.needsOuterParam(type)) {
runnable.run();
} else if (ElementUtil.isLocal(type)) {
Scope scope = findScopeForType(type);
if (scope != null) {
scope.onOuterParam.add(captureCurrentScope(runnable));
... | java | private void whenNeedsOuterParam(TypeElement type, Runnable runnable) {
if (captureInfo.needsOuterParam(type)) {
runnable.run();
} else if (ElementUtil.isLocal(type)) {
Scope scope = findScopeForType(type);
if (scope != null) {
scope.onOuterParam.add(captureCurrentScope(runnable));
... | [
"private",
"void",
"whenNeedsOuterParam",
"(",
"TypeElement",
"type",
",",
"Runnable",
"runnable",
")",
"{",
"if",
"(",
"captureInfo",
".",
"needsOuterParam",
"(",
"type",
")",
")",
"{",
"runnable",
".",
"run",
"(",
")",
";",
"}",
"else",
"if",
"(",
"Ele... | Executes the runnable if or when the given type needs an outer param. | [
"Executes",
"the",
"runnable",
"if",
"or",
"when",
"the",
"given",
"type",
"needs",
"an",
"outer",
"param",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java#L201-L210 |
35,614 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java | OuterReferenceResolver.addSuperOuterPath | private void addSuperOuterPath(TypeDeclaration node) {
TypeElement superclass = ElementUtil.getSuperclass(node.getTypeElement());
if (superclass != null && captureInfo.needsOuterParam(superclass)) {
node.setSuperOuter(getOuterPathInherited(ElementUtil.getDeclaringClass(superclass)));
}
} | java | private void addSuperOuterPath(TypeDeclaration node) {
TypeElement superclass = ElementUtil.getSuperclass(node.getTypeElement());
if (superclass != null && captureInfo.needsOuterParam(superclass)) {
node.setSuperOuter(getOuterPathInherited(ElementUtil.getDeclaringClass(superclass)));
}
} | [
"private",
"void",
"addSuperOuterPath",
"(",
"TypeDeclaration",
"node",
")",
"{",
"TypeElement",
"superclass",
"=",
"ElementUtil",
".",
"getSuperclass",
"(",
"node",
".",
"getTypeElement",
"(",
")",
")",
";",
"if",
"(",
"superclass",
"!=",
"null",
"&&",
"captu... | type node because there may be implicit super invocations. | [
"type",
"node",
"because",
"there",
"may",
"be",
"implicit",
"super",
"invocations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OuterReferenceResolver.java#L286-L291 |
35,615 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java | CharsetEncoder.replaceWith | public final CharsetEncoder replaceWith(byte[] newReplacement) {
if (newReplacement == null)
throw new IllegalArgumentException("Null replacement");
int len = newReplacement.length;
if (len == 0)
throw new IllegalArgumentException("Empty replacement");
if (len > m... | java | public final CharsetEncoder replaceWith(byte[] newReplacement) {
if (newReplacement == null)
throw new IllegalArgumentException("Null replacement");
int len = newReplacement.length;
if (len == 0)
throw new IllegalArgumentException("Empty replacement");
if (len > m... | [
"public",
"final",
"CharsetEncoder",
"replaceWith",
"(",
"byte",
"[",
"]",
"newReplacement",
")",
"{",
"if",
"(",
"newReplacement",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null replacement\"",
")",
";",
"int",
"len",
"=",
"newRepla... | Changes this encoder's replacement value.
<p> This method invokes the {@link #implReplaceWith implReplaceWith}
method, passing the new replacement, after checking that the new
replacement is acceptable. </p>
@param newReplacement
The new replacement; must not be <tt>null</tt>, must have
non-zero length, must ... | [
"Changes",
"this",
"encoder",
"s",
"replacement",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java#L294-L309 |
35,616 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java | CharsetEncoder.isLegalReplacement | public boolean isLegalReplacement(byte[] repl) {
/* J2ObjC: Removed use of WeakReference.
WeakReference<CharsetDecoder> wr = cachedDecoder;
CharsetDecoder dec = null;
if ((wr == null) || ((dec = wr.get()) == null)) {*/
CharsetDecoder dec = cachedDecoder;
if (dec == null) ... | java | public boolean isLegalReplacement(byte[] repl) {
/* J2ObjC: Removed use of WeakReference.
WeakReference<CharsetDecoder> wr = cachedDecoder;
CharsetDecoder dec = null;
if ((wr == null) || ((dec = wr.get()) == null)) {*/
CharsetDecoder dec = cachedDecoder;
if (dec == null) ... | [
"public",
"boolean",
"isLegalReplacement",
"(",
"byte",
"[",
"]",
"repl",
")",
"{",
"/* J2ObjC: Removed use of WeakReference.\n WeakReference<CharsetDecoder> wr = cachedDecoder;\n CharsetDecoder dec = null;\n if ((wr == null) || ((dec = wr.get()) == null)) {*/",
"CharsetDe... | Tells whether or not the given byte array is a legal replacement value
for this encoder.
<p> A replacement is legal if, and only if, it is a legal sequence of
bytes in this encoder's charset; that is, it must be possible to decode
the replacement into one or more sixteen-bit Unicode characters.
<p> The default implem... | [
"Tells",
"whether",
"or",
"not",
"the",
"given",
"byte",
"array",
"is",
"a",
"legal",
"replacement",
"value",
"for",
"this",
"encoder",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java#L343-L363 |
35,617 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java | CharsetEncoder.onUnmappableCharacter | public final CharsetEncoder onUnmappableCharacter(CodingErrorAction
newAction)
{
if (newAction == null)
throw new IllegalArgumentException("Null action");
unmappableCharacterAction = newAction;
implOnUnmappableCharacter(newAct... | java | public final CharsetEncoder onUnmappableCharacter(CodingErrorAction
newAction)
{
if (newAction == null)
throw new IllegalArgumentException("Null action");
unmappableCharacterAction = newAction;
implOnUnmappableCharacter(newAct... | [
"public",
"final",
"CharsetEncoder",
"onUnmappableCharacter",
"(",
"CodingErrorAction",
"newAction",
")",
"{",
"if",
"(",
"newAction",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null action\"",
")",
";",
"unmappableCharacterAction",
"=",
"n... | Changes this encoder's action for unmappable-character errors.
<p> This method invokes the {@link #implOnUnmappableCharacter
implOnUnmappableCharacter} method, passing the new action. </p>
@param newAction The new action; must not be <tt>null</tt>
@return This encoder
@throws IllegalArgumentException
If the pre... | [
"Changes",
"this",
"encoder",
"s",
"action",
"for",
"unmappable",
"-",
"character",
"errors",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java#L430-L438 |
35,618 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java | CharsetEncoder.encode | public final ByteBuffer encode(CharBuffer in)
throws CharacterCodingException
{
int n = (int)(in.remaining() * averageBytesPerChar());
ByteBuffer out = ByteBuffer.allocate(n);
if ((n == 0) && (in.remaining() == 0))
return out;
reset();
for (;;) {
... | java | public final ByteBuffer encode(CharBuffer in)
throws CharacterCodingException
{
int n = (int)(in.remaining() * averageBytesPerChar());
ByteBuffer out = ByteBuffer.allocate(n);
if ((n == 0) && (in.remaining() == 0))
return out;
reset();
for (;;) {
... | [
"public",
"final",
"ByteBuffer",
"encode",
"(",
"CharBuffer",
"in",
")",
"throws",
"CharacterCodingException",
"{",
"int",
"n",
"=",
"(",
"int",
")",
"(",
"in",
".",
"remaining",
"(",
")",
"*",
"averageBytesPerChar",
"(",
")",
")",
";",
"ByteBuffer",
"out"... | Convenience method that encodes the remaining content of a single input
character buffer into a newly-allocated byte buffer.
<p> This method implements an entire <a href="#steps">encoding
operation</a>; that is, it resets this encoder, then it encodes the
characters in the given character buffer, and finally it flushe... | [
"Convenience",
"method",
"that",
"encodes",
"the",
"remaining",
"content",
"of",
"a",
"single",
"input",
"character",
"buffer",
"into",
"a",
"newly",
"-",
"allocated",
"byte",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java#L796-L825 |
35,619 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java | CharsetEncoder.canEncode | public boolean canEncode(char c) {
CharBuffer cb = CharBuffer.allocate(1);
cb.put(c);
cb.flip();
return canEncode(cb);
} | java | public boolean canEncode(char c) {
CharBuffer cb = CharBuffer.allocate(1);
cb.put(c);
cb.flip();
return canEncode(cb);
} | [
"public",
"boolean",
"canEncode",
"(",
"char",
"c",
")",
"{",
"CharBuffer",
"cb",
"=",
"CharBuffer",
".",
"allocate",
"(",
"1",
")",
";",
"cb",
".",
"put",
"(",
"c",
")",
";",
"cb",
".",
"flip",
"(",
")",
";",
"return",
"canEncode",
"(",
"cb",
")... | Tells whether or not this encoder can encode the given character.
<p> This method returns <tt>false</tt> if the given character is a
surrogate character; such characters can be interpreted only when they
are members of a pair consisting of a high surrogate followed by a low
surrogate. The {@link #canEncode(java.lang.... | [
"Tells",
"whether",
"or",
"not",
"this",
"encoder",
"can",
"encode",
"the",
"given",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetEncoder.java#L957-L962 |
35,620 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java | ParserFactory.makeParser | public static Parser makeParser ()
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException,
NullPointerException,
ClassCastException
{
String className = System.getProperty("org.xml.sax.parser");
if (className == null) {
throw new NullPointerException("No va... | java | public static Parser makeParser ()
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException,
NullPointerException,
ClassCastException
{
String className = System.getProperty("org.xml.sax.parser");
if (className == null) {
throw new NullPointerException("No va... | [
"public",
"static",
"Parser",
"makeParser",
"(",
")",
"throws",
"ClassNotFoundException",
",",
"IllegalAccessException",
",",
"InstantiationException",
",",
"NullPointerException",
",",
"ClassCastException",
"{",
"String",
"className",
"=",
"System",
".",
"getProperty",
... | Create a new SAX parser using the `org.xml.sax.parser' system property.
<p>The named class must exist and must implement the
{@link org.xml.sax.Parser Parser} interface.</p>
@return the newly created parser.
@exception java.lang.NullPointerException There is no value
for the `org.xml.sax.parser' system property.
@ex... | [
"Create",
"a",
"new",
"SAX",
"parser",
"using",
"the",
"org",
".",
"xml",
".",
"sax",
".",
"parser",
"system",
"property",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java#L78-L91 |
35,621 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java | ParserFactory.makeParser | public static Parser makeParser (String className)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException,
ClassCastException
{
return (Parser) NewInstance.newInstance (
NewInstance.getClassLoader (), className);
} | java | public static Parser makeParser (String className)
throws ClassNotFoundException,
IllegalAccessException,
InstantiationException,
ClassCastException
{
return (Parser) NewInstance.newInstance (
NewInstance.getClassLoader (), className);
} | [
"public",
"static",
"Parser",
"makeParser",
"(",
"String",
"className",
")",
"throws",
"ClassNotFoundException",
",",
"IllegalAccessException",
",",
"InstantiationException",
",",
"ClassCastException",
"{",
"return",
"(",
"Parser",
")",
"NewInstance",
".",
"newInstance"... | Create a new SAX parser object using the class name provided.
<p>The named class must exist and must implement the
{@link org.xml.sax.Parser Parser} interface.</p>
@return the newly created parser.
@param className A string containing the name of the
SAX parser class.
@exception java.lang.ClassNotFoundException The ... | [
"Create",
"a",
"new",
"SAX",
"parser",
"object",
"using",
"the",
"class",
"name",
"provided",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/ParserFactory.java#L117-L125 |
35,622 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertificatePair.java | X509CertificatePair.generateCertificatePair | public static synchronized X509CertificatePair generateCertificatePair
(byte[] encoded) throws CertificateException {
Object key = new Cache.EqualByteArray(encoded);
X509CertificatePair pair = cache.get(key);
if (pair != null) {
return pair;
}
pair = new X... | java | public static synchronized X509CertificatePair generateCertificatePair
(byte[] encoded) throws CertificateException {
Object key = new Cache.EqualByteArray(encoded);
X509CertificatePair pair = cache.get(key);
if (pair != null) {
return pair;
}
pair = new X... | [
"public",
"static",
"synchronized",
"X509CertificatePair",
"generateCertificatePair",
"(",
"byte",
"[",
"]",
"encoded",
")",
"throws",
"CertificateException",
"{",
"Object",
"key",
"=",
"new",
"Cache",
".",
"EqualByteArray",
"(",
"encoded",
")",
";",
"X509Certificat... | Create a X509CertificatePair from its encoding. Uses cache lookup
if possible. | [
"Create",
"a",
"X509CertificatePair",
"from",
"its",
"encoding",
".",
"Uses",
"cache",
"lookup",
"if",
"possible",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertificatePair.java#L139-L150 |
35,623 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertificatePair.java | X509CertificatePair.getEncoded | public byte[] getEncoded() throws CertificateEncodingException {
try {
if (encoded == null) {
DerOutputStream tmp = new DerOutputStream();
emit(tmp);
encoded = tmp.toByteArray();
}
} catch (IOException ex) {
throw new Ce... | java | public byte[] getEncoded() throws CertificateEncodingException {
try {
if (encoded == null) {
DerOutputStream tmp = new DerOutputStream();
emit(tmp);
encoded = tmp.toByteArray();
}
} catch (IOException ex) {
throw new Ce... | [
"public",
"byte",
"[",
"]",
"getEncoded",
"(",
")",
"throws",
"CertificateEncodingException",
"{",
"try",
"{",
"if",
"(",
"encoded",
"==",
"null",
")",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"emit",
"(",
"tmp",
")",
... | Return the DER encoded form of the certificate pair.
@return The encoded form of the certificate pair.
@throws CerticateEncodingException If an encoding exception occurs. | [
"Return",
"the",
"DER",
"encoded",
"form",
"of",
"the",
"certificate",
"pair",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertificatePair.java#L192-L203 |
35,624 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringMatcher.java | StringMatcher.addMatchSetTo | @Override
public void addMatchSetTo(UnicodeSet toUnionTo) {
int ch;
for (int i=0; i<pattern.length(); i+=UTF16.getCharCount(ch)) {
ch = UTF16.charAt(pattern, i);
UnicodeMatcher matcher = data.lookupMatcher(ch);
if (matcher == null) {
toUnionTo.add(... | java | @Override
public void addMatchSetTo(UnicodeSet toUnionTo) {
int ch;
for (int i=0; i<pattern.length(); i+=UTF16.getCharCount(ch)) {
ch = UTF16.charAt(pattern, i);
UnicodeMatcher matcher = data.lookupMatcher(ch);
if (matcher == null) {
toUnionTo.add(... | [
"@",
"Override",
"public",
"void",
"addMatchSetTo",
"(",
"UnicodeSet",
"toUnionTo",
")",
"{",
"int",
"ch",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"pattern",
".",
"length",
"(",
")",
";",
"i",
"+=",
"UTF16",
".",
"getCharCount",
"(",
... | Implementation of UnicodeMatcher API. Union the set of all
characters that may be matched by this object into the given
set.
@param toUnionTo the set into which to union the source characters | [
"Implementation",
"of",
"UnicodeMatcher",
"API",
".",
"Union",
"the",
"set",
"of",
"all",
"characters",
"that",
"may",
"be",
"matched",
"by",
"this",
"object",
"into",
"the",
"given",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringMatcher.java#L224-L236 |
35,625 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificatePolicySet.java | CertificatePolicySet.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < ids.size(); i++) {
ids.elementAt(i).encode(tmp);
}
out.write(DerValue.tag_Sequence,tmp);
} | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < ids.size(); i++) {
ids.elementAt(i).encode(tmp);
}
out.write(DerValue.tag_Sequence,tmp);
} | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"ids",
".",
"size",
"(",
")",
";",
... | Encode the policy set to the output stream.
@param out the DerOutputStream to encode the data to. | [
"Encode",
"the",
"policy",
"set",
"to",
"the",
"output",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificatePolicySet.java#L86-L93 |
35,626 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java | SimpleTimeZone.makeRulesCompatible | private void makeRulesCompatible()
{
switch (startMode) {
case DOM_MODE:
startDay = 1 + (startDay / 7);
startDayOfWeek = Calendar.SUNDAY;
break;
case DOW_GE_DOM_MODE:
// A day-of-month of 1 is equivalent to DOW_IN_MONTH_MODE
// tha... | java | private void makeRulesCompatible()
{
switch (startMode) {
case DOM_MODE:
startDay = 1 + (startDay / 7);
startDayOfWeek = Calendar.SUNDAY;
break;
case DOW_GE_DOM_MODE:
// A day-of-month of 1 is equivalent to DOW_IN_MONTH_MODE
// tha... | [
"private",
"void",
"makeRulesCompatible",
"(",
")",
"{",
"switch",
"(",
"startMode",
")",
"{",
"case",
"DOM_MODE",
":",
"startDay",
"=",
"1",
"+",
"(",
"startDay",
"/",
"7",
")",
";",
"startDayOfWeek",
"=",
"Calendar",
".",
"SUNDAY",
";",
"break",
";",
... | Make rules compatible to 1.1 FCS code. Since 1.1 FCS code only understands
day-of-week-in-month rules, we must modify other modes of rules to their
approximate equivalent in 1.1 FCS terms. This method is used when streaming
out objects of this class. After it is called, the rules will be modified,
with a possible lo... | [
"Make",
"rules",
"compatible",
"to",
"1",
".",
"1",
"FCS",
"code",
".",
"Since",
"1",
".",
"1",
"FCS",
"code",
"only",
"understands",
"day",
"-",
"of",
"-",
"week",
"-",
"in",
"-",
"month",
"rules",
"we",
"must",
"modify",
"other",
"modes",
"of",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L1477-L1564 |
35,627 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java | SimpleTimeZone.packRules | private byte[] packRules()
{
byte[] rules = new byte[6];
rules[0] = (byte)startDay;
rules[1] = (byte)startDayOfWeek;
rules[2] = (byte)endDay;
rules[3] = (byte)endDayOfWeek;
// As of serial version 2, include time modes
rules[4] = (byte)startTimeMode;
... | java | private byte[] packRules()
{
byte[] rules = new byte[6];
rules[0] = (byte)startDay;
rules[1] = (byte)startDayOfWeek;
rules[2] = (byte)endDay;
rules[3] = (byte)endDayOfWeek;
// As of serial version 2, include time modes
rules[4] = (byte)startTimeMode;
... | [
"private",
"byte",
"[",
"]",
"packRules",
"(",
")",
"{",
"byte",
"[",
"]",
"rules",
"=",
"new",
"byte",
"[",
"6",
"]",
";",
"rules",
"[",
"0",
"]",
"=",
"(",
"byte",
")",
"startDay",
";",
"rules",
"[",
"1",
"]",
"=",
"(",
"byte",
")",
"startD... | Pack the start and end rules into an array of bytes. Only pack
data which is not preserved by makeRulesCompatible. | [
"Pack",
"the",
"start",
"and",
"end",
"rules",
"into",
"an",
"array",
"of",
"bytes",
".",
"Only",
"pack",
"data",
"which",
"is",
"not",
"preserved",
"by",
"makeRulesCompatible",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L1570-L1583 |
35,628 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java | SimpleTimeZone.unpackRules | private void unpackRules(byte[] rules)
{
startDay = rules[0];
startDayOfWeek = rules[1];
endDay = rules[2];
endDayOfWeek = rules[3];
// As of serial version 2, include time modes
if (rules.length >= 6) {
startTimeMode = rules[4];
... | java | private void unpackRules(byte[] rules)
{
startDay = rules[0];
startDayOfWeek = rules[1];
endDay = rules[2];
endDayOfWeek = rules[3];
// As of serial version 2, include time modes
if (rules.length >= 6) {
startTimeMode = rules[4];
... | [
"private",
"void",
"unpackRules",
"(",
"byte",
"[",
"]",
"rules",
")",
"{",
"startDay",
"=",
"rules",
"[",
"0",
"]",
";",
"startDayOfWeek",
"=",
"rules",
"[",
"1",
"]",
";",
"endDay",
"=",
"rules",
"[",
"2",
"]",
";",
"endDayOfWeek",
"=",
"rules",
... | Given an array of bytes produced by packRules, interpret them
as the start and end rules. | [
"Given",
"an",
"array",
"of",
"bytes",
"produced",
"by",
"packRules",
"interpret",
"them",
"as",
"the",
"start",
"and",
"end",
"rules",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/SimpleTimeZone.java#L1589-L1601 |
35,629 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.get | private static <T> T get(ListIterator<? extends T> i, int index) {
T obj = null;
int pos = i.nextIndex();
if (pos <= index) {
do {
obj = i.next();
} while (pos++ < index);
} else {
do {
obj = i.previous();
} ... | java | private static <T> T get(ListIterator<? extends T> i, int index) {
T obj = null;
int pos = i.nextIndex();
if (pos <= index) {
do {
obj = i.next();
} while (pos++ < index);
} else {
do {
obj = i.previous();
} ... | [
"private",
"static",
"<",
"T",
">",
"T",
"get",
"(",
"ListIterator",
"<",
"?",
"extends",
"T",
">",
"i",
",",
"int",
"index",
")",
"{",
"T",
"obj",
"=",
"null",
";",
"int",
"pos",
"=",
"i",
".",
"nextIndex",
"(",
")",
";",
"if",
"(",
"pos",
"... | Gets the ith element from the given list by repositioning the specified
list listIterator. | [
"Gets",
"the",
"ith",
"element",
"from",
"the",
"given",
"list",
"by",
"repositioning",
"the",
"specified",
"list",
"listIterator",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L296-L309 |
35,630 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.shuffle | public static void shuffle(List<?> list) {
Random rnd = r;
if (rnd == null)
r = rnd = new Random(); // harmless race.
shuffle(list, rnd);
} | java | public static void shuffle(List<?> list) {
Random rnd = r;
if (rnd == null)
r = rnd = new Random(); // harmless race.
shuffle(list, rnd);
} | [
"public",
"static",
"void",
"shuffle",
"(",
"List",
"<",
"?",
">",
"list",
")",
"{",
"Random",
"rnd",
"=",
"r",
";",
"if",
"(",
"rnd",
"==",
"null",
")",
"r",
"=",
"rnd",
"=",
"new",
"Random",
"(",
")",
";",
"// harmless race.",
"shuffle",
"(",
"... | Randomly permutes the specified list using a default source of
randomness. All permutations occur with approximately equal
likelihood.
<p>The hedge "approximately" is used in the foregoing description because
default source of randomness is only approximately an unbiased source
of independently chosen bits. If it wer... | [
"Randomly",
"permutes",
"the",
"specified",
"list",
"using",
"a",
"default",
"source",
"of",
"randomness",
".",
"All",
"permutations",
"occur",
"with",
"approximately",
"equal",
"likelihood",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L453-L458 |
35,631 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.singletonMap | public static <K,V> Map<K,V> singletonMap(K key, V value) {
return new SingletonMap<>(key, value);
} | java | public static <K,V> Map<K,V> singletonMap(K key, V value) {
return new SingletonMap<>(key, value);
} | [
"public",
"static",
"<",
"K",
",",
"V",
">",
"Map",
"<",
"K",
",",
"V",
">",
"singletonMap",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"return",
"new",
"SingletonMap",
"<>",
"(",
"key",
",",
"value",
")",
";",
"}"
] | Returns an immutable map, mapping only the specified key to the
specified value. The returned map is serializable.
@param <K> the class of the map keys
@param <V> the class of the map values
@param key the sole key to be stored in the returned map.
@param value the value to which the returned map maps <tt>key</tt>.
@... | [
"Returns",
"an",
"immutable",
"map",
"mapping",
"only",
"the",
"specified",
"key",
"to",
"the",
"specified",
"value",
".",
"The",
"returned",
"map",
"is",
"serializable",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L4889-L4891 |
35,632 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.enumeration | public static <T> Enumeration<T> enumeration(final Collection<T> c) {
return new Enumeration<T>() {
private final Iterator<T> i = c.iterator();
public boolean hasMoreElements() {
return i.hasNext();
}
public T nextElement() {
retu... | java | public static <T> Enumeration<T> enumeration(final Collection<T> c) {
return new Enumeration<T>() {
private final Iterator<T> i = c.iterator();
public boolean hasMoreElements() {
return i.hasNext();
}
public T nextElement() {
retu... | [
"public",
"static",
"<",
"T",
">",
"Enumeration",
"<",
"T",
">",
"enumeration",
"(",
"final",
"Collection",
"<",
"T",
">",
"c",
")",
"{",
"return",
"new",
"Enumeration",
"<",
"T",
">",
"(",
")",
"{",
"private",
"final",
"Iterator",
"<",
"T",
">",
"... | Returns an enumeration over the specified collection. This provides
interoperability with legacy APIs that require an enumeration
as input.
@param <T> the class of the objects in the collection
@param c the collection for which an enumeration is to be returned.
@return an enumeration over the specified collection.
@... | [
"Returns",
"an",
"enumeration",
"over",
"the",
"specified",
"collection",
".",
"This",
"provides",
"interoperability",
"with",
"legacy",
"APIs",
"that",
"require",
"an",
"enumeration",
"as",
"input",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L5247-L5259 |
35,633 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java | Collections.list | public static <T> ArrayList<T> list(Enumeration<T> e) {
ArrayList<T> l = new ArrayList<>();
while (e.hasMoreElements())
l.add(e.nextElement());
return l;
} | java | public static <T> ArrayList<T> list(Enumeration<T> e) {
ArrayList<T> l = new ArrayList<>();
while (e.hasMoreElements())
l.add(e.nextElement());
return l;
} | [
"public",
"static",
"<",
"T",
">",
"ArrayList",
"<",
"T",
">",
"list",
"(",
"Enumeration",
"<",
"T",
">",
"e",
")",
"{",
"ArrayList",
"<",
"T",
">",
"l",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"while",
"(",
"e",
".",
"hasMoreElements",
"("... | Returns an array list containing the elements returned by the
specified enumeration in the order they are returned by the
enumeration. This method provides interoperability between
legacy APIs that return enumerations and new APIs that require
collections.
@param <T> the class of the objects returned by the enumerati... | [
"Returns",
"an",
"array",
"list",
"containing",
"the",
"elements",
"returned",
"by",
"the",
"specified",
"enumeration",
"in",
"the",
"order",
"they",
"are",
"returned",
"by",
"the",
"enumeration",
".",
"This",
"method",
"provides",
"interoperability",
"between",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Collections.java#L5277-L5282 |
35,634 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java | ElemExtensionCall.getElemExtensionDecl | private ElemExtensionDecl getElemExtensionDecl(StylesheetRoot stylesheet,
String namespace)
{
ElemExtensionDecl decl = null;
int n = stylesheet.getGlobalImportCount();
for (int i = 0; i < n; i++)
{
Stylesheet imported = stylesheet.getGlobalImport(i);
for (ElemTemplateElement c... | java | private ElemExtensionDecl getElemExtensionDecl(StylesheetRoot stylesheet,
String namespace)
{
ElemExtensionDecl decl = null;
int n = stylesheet.getGlobalImportCount();
for (int i = 0; i < n; i++)
{
Stylesheet imported = stylesheet.getGlobalImport(i);
for (ElemTemplateElement c... | [
"private",
"ElemExtensionDecl",
"getElemExtensionDecl",
"(",
"StylesheetRoot",
"stylesheet",
",",
"String",
"namespace",
")",
"{",
"ElemExtensionDecl",
"decl",
"=",
"null",
";",
"int",
"n",
"=",
"stylesheet",
".",
"getGlobalImportCount",
"(",
")",
";",
"for",
"(",... | Return the ElemExtensionDecl for this extension element
@param stylesheet Stylesheet root associated with this extension element
@param namespace Namespace associated with this extension element
@return the ElemExtensionDecl for this extension element. | [
"Return",
"the",
"ElemExtensionDecl",
"for",
"this",
"extension",
"element"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java#L111-L141 |
35,635 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java | ElemExtensionCall.execute | public void execute(TransformerImpl transformer)
throws TransformerException
{
if (transformer.getStylesheet().isSecureProcessing())
throw new TransformerException(
XSLMessages.createMessage(
XSLTErrorResources.ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
ne... | java | public void execute(TransformerImpl transformer)
throws TransformerException
{
if (transformer.getStylesheet().isSecureProcessing())
throw new TransformerException(
XSLMessages.createMessage(
XSLTErrorResources.ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
ne... | [
"public",
"void",
"execute",
"(",
"TransformerImpl",
"transformer",
")",
"throws",
"TransformerException",
"{",
"if",
"(",
"transformer",
".",
"getStylesheet",
"(",
")",
".",
"isSecureProcessing",
"(",
")",
")",
"throw",
"new",
"TransformerException",
"(",
"XSLMes... | Execute an extension.
@param transformer non-null reference to the the current transform-time state.
@throws TransformerException | [
"Execute",
"an",
"extension",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java#L198-L268 |
35,636 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java | Normalizer.normalize | @Deprecated
public static String normalize(int char32, Mode mode, int options) {
if(mode == NFD && options == 0) {
String decomposition = Normalizer2.getNFCInstance().getDecomposition(char32);
if(decomposition == null) {
decomposition = UTF16.valueOf(char32);
... | java | @Deprecated
public static String normalize(int char32, Mode mode, int options) {
if(mode == NFD && options == 0) {
String decomposition = Normalizer2.getNFCInstance().getDecomposition(char32);
if(decomposition == null) {
decomposition = UTF16.valueOf(char32);
... | [
"@",
"Deprecated",
"public",
"static",
"String",
"normalize",
"(",
"int",
"char32",
",",
"Mode",
"mode",
",",
"int",
"options",
")",
"{",
"if",
"(",
"mode",
"==",
"NFD",
"&&",
"options",
"==",
"0",
")",
"{",
"String",
"decomposition",
"=",
"Normalizer2",... | Normalize a codepoint according to the given mode
@param char32 The input string to be normalized.
@param mode The normalization mode
@param options Options for use with exclusion set and tailored Normalization
The only option that is currently recognized is UNICODE_3_2
@return String The normalized string
... | [
"Normalize",
"a",
"codepoint",
"according",
"to",
"the",
"given",
"mode"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L946-L956 |
35,637 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java | Normalizer.current | @Deprecated
public int current() {
if(bufferPos<buffer.length() || nextNormalize()) {
return buffer.codePointAt(bufferPos);
} else {
return DONE;
}
} | java | @Deprecated
public int current() {
if(bufferPos<buffer.length() || nextNormalize()) {
return buffer.codePointAt(bufferPos);
} else {
return DONE;
}
} | [
"@",
"Deprecated",
"public",
"int",
"current",
"(",
")",
"{",
"if",
"(",
"bufferPos",
"<",
"buffer",
".",
"length",
"(",
")",
"||",
"nextNormalize",
"(",
")",
")",
"{",
"return",
"buffer",
".",
"codePointAt",
"(",
"bufferPos",
")",
";",
"}",
"else",
... | Return the current character in the normalized text.
@return The codepoint as an int
@deprecated ICU 56
@hide original deprecated declaration | [
"Return",
"the",
"current",
"character",
"in",
"the",
"normalized",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer.java#L1520-L1527 |
35,638 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringReplacer.java | StringReplacer.addReplacementSetTo | @Override
public void addReplacementSetTo(UnicodeSet toUnionTo) {
int ch;
for (int i=0; i<output.length(); i+=UTF16.getCharCount(ch)) {
ch = UTF16.charAt(output, i);
UnicodeReplacer r = data.lookupReplacer(ch);
if (r == null) {
toUnionTo.add(ch);
... | java | @Override
public void addReplacementSetTo(UnicodeSet toUnionTo) {
int ch;
for (int i=0; i<output.length(); i+=UTF16.getCharCount(ch)) {
ch = UTF16.charAt(output, i);
UnicodeReplacer r = data.lookupReplacer(ch);
if (r == null) {
toUnionTo.add(ch);
... | [
"@",
"Override",
"public",
"void",
"addReplacementSetTo",
"(",
"UnicodeSet",
"toUnionTo",
")",
"{",
"int",
"ch",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"output",
".",
"length",
"(",
")",
";",
"i",
"+=",
"UTF16",
".",
"getCharCount",
"(... | Union the set of all characters that may output by this object
into the given set.
@param toUnionTo the set into which to union the output characters | [
"Union",
"the",
"set",
"of",
"all",
"characters",
"that",
"may",
"output",
"by",
"this",
"object",
"into",
"the",
"given",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringReplacer.java#L324-L336 |
35,639 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/provider/CalendarDataUtility.java | CalendarDataUtility.retrieveFieldValueName | public static String retrieveFieldValueName(String id, int field, int value, int style,
Locale locale) {
// Android-changed: delegate to ICU.
if (field == Calendar.ERA) {
// For era the field value does not always equal the index into the names array.
switch (normaliz... | java | public static String retrieveFieldValueName(String id, int field, int value, int style,
Locale locale) {
// Android-changed: delegate to ICU.
if (field == Calendar.ERA) {
// For era the field value does not always equal the index into the names array.
switch (normaliz... | [
"public",
"static",
"String",
"retrieveFieldValueName",
"(",
"String",
"id",
",",
"int",
"field",
",",
"int",
"value",
",",
"int",
"style",
",",
"Locale",
"locale",
")",
"{",
"// Android-changed: delegate to ICU.",
"if",
"(",
"field",
"==",
"Calendar",
".",
"E... | use libcore.icu.LocaleData or android.icu.util.Calendar.WeekData instead | [
"use",
"libcore",
".",
"icu",
".",
"LocaleData",
"or",
"android",
".",
"icu",
".",
"util",
".",
"Calendar",
".",
"WeekData",
"instead"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/locale/provider/CalendarDataUtility.java#L58-L88 |
35,640 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java | ToSAXHandler.setContentHandler | public void setContentHandler(ContentHandler _saxHandler)
{
this.m_saxHandler = _saxHandler;
if (m_lexHandler == null && _saxHandler instanceof LexicalHandler)
{
// we are not overwriting an existing LexicalHandler, and _saxHandler
// is also implements LexicalHandler... | java | public void setContentHandler(ContentHandler _saxHandler)
{
this.m_saxHandler = _saxHandler;
if (m_lexHandler == null && _saxHandler instanceof LexicalHandler)
{
// we are not overwriting an existing LexicalHandler, and _saxHandler
// is also implements LexicalHandler... | [
"public",
"void",
"setContentHandler",
"(",
"ContentHandler",
"_saxHandler",
")",
"{",
"this",
".",
"m_saxHandler",
"=",
"_saxHandler",
";",
"if",
"(",
"m_lexHandler",
"==",
"null",
"&&",
"_saxHandler",
"instanceof",
"LexicalHandler",
")",
"{",
"// we are not overwr... | Sets the SAX ContentHandler.
@param _saxHandler The ContentHandler to set | [
"Sets",
"the",
"SAX",
"ContentHandler",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java#L221-L230 |
35,641 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java | ToSAXHandler.startElement | public void startElement(String uri, String localName, String qName)
throws SAXException {
if (m_state != null) {
m_state.resetState(getTransformer());
}
// fire off the start element event
if (m_tracer != null)
super.fireStartElem(qName); ... | java | public void startElement(String uri, String localName, String qName)
throws SAXException {
if (m_state != null) {
m_state.resetState(getTransformer());
}
// fire off the start element event
if (m_tracer != null)
super.fireStartElem(qName); ... | [
"public",
"void",
"startElement",
"(",
"String",
"uri",
",",
"String",
"localName",
",",
"String",
"qName",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"m_state",
"!=",
"null",
")",
"{",
"m_state",
".",
"resetState",
"(",
"getTransformer",
"(",
")",
")"... | Receives notification that an element starts, but attributes are not
fully known yet.
@param uri the URI of the namespace of the element (optional)
@param localName the element name, but without prefix (optional)
@param qName the element name, with prefix, if any (required)
@see ExtendedContentHandler#startElement(St... | [
"Receives",
"notification",
"that",
"an",
"element",
"starts",
"but",
"attributes",
"are",
"not",
"fully",
"known",
"yet",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java#L313-L323 |
35,642 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java | ToSAXHandler.characters | public void characters(org.w3c.dom.Node node)
throws org.xml.sax.SAXException
{
// remember the current node
if (m_state != null)
{
m_state.setCurrentNode(node);
}
// Get the node's value as a String and use that String as if
// it were an... | java | public void characters(org.w3c.dom.Node node)
throws org.xml.sax.SAXException
{
// remember the current node
if (m_state != null)
{
m_state.setCurrentNode(node);
}
// Get the node's value as a String and use that String as if
// it were an... | [
"public",
"void",
"characters",
"(",
"org",
".",
"w3c",
".",
"dom",
".",
"Node",
"node",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"// remember the current node",
"if",
"(",
"m_state",
"!=",
"null",
")",
"{",
"m_state",
".",... | This method gets the node's value as a String and uses that String as if
it were an input character notification.
@param node the Node to serialize
@throws org.xml.sax.SAXException | [
"This",
"method",
"gets",
"the",
"node",
"s",
"value",
"as",
"a",
"String",
"and",
"uses",
"that",
"String",
"as",
"if",
"it",
"were",
"an",
"input",
"character",
"notification",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java#L347-L362 |
35,643 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java | ToSAXHandler.addUniqueAttribute | public void addUniqueAttribute(String qName, String value, int flags)
throws SAXException
{
addAttribute(qName, value);
} | java | public void addUniqueAttribute(String qName, String value, int flags)
throws SAXException
{
addAttribute(qName, value);
} | [
"public",
"void",
"addUniqueAttribute",
"(",
"String",
"qName",
",",
"String",
"value",
",",
"int",
"flags",
")",
"throws",
"SAXException",
"{",
"addAttribute",
"(",
"qName",
",",
"value",
")",
";",
"}"
] | Add a unique attribute | [
"Add",
"a",
"unique",
"attribute"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToSAXHandler.java#L433-L437 |
35,644 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.findTopLevel | @Deprecated
protected UResourceBundle findTopLevel(String aKey) {
// NOTE: this only works for top-level resources. For resources at lower
// levels, it fails when you fall back to the parent, since you're now
// looking at root resources, not at the corresponding nested resource.
f... | java | @Deprecated
protected UResourceBundle findTopLevel(String aKey) {
// NOTE: this only works for top-level resources. For resources at lower
// levels, it fails when you fall back to the parent, since you're now
// looking at root resources, not at the corresponding nested resource.
f... | [
"@",
"Deprecated",
"protected",
"UResourceBundle",
"findTopLevel",
"(",
"String",
"aKey",
")",
"{",
"// NOTE: this only works for top-level resources. For resources at lower",
"// levels, it fails when you fall back to the parent, since you're now",
"// looking at root resources, not at the... | Returns a resource in a given resource that has a given key, or null if the
resource is not found.
@param aKey the key associated with the wanted resource
@return the resource, or null
@see #get(String)
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Returns",
"a",
"resource",
"in",
"a",
"given",
"resource",
"that",
"has",
"a",
"given",
"key",
"or",
"null",
"if",
"the",
"resource",
"is",
"not",
"found",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L506-L518 |
35,645 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.getString | public String getString(int index) {
ICUResourceBundle temp = (ICUResourceBundle)get(index);
if (temp.getType() == STRING) {
return temp.getString();
}
throw new UResourceTypeMismatchException("");
} | java | public String getString(int index) {
ICUResourceBundle temp = (ICUResourceBundle)get(index);
if (temp.getType() == STRING) {
return temp.getString();
}
throw new UResourceTypeMismatchException("");
} | [
"public",
"String",
"getString",
"(",
"int",
"index",
")",
"{",
"ICUResourceBundle",
"temp",
"=",
"(",
"ICUResourceBundle",
")",
"get",
"(",
"index",
")",
";",
"if",
"(",
"temp",
".",
"getType",
"(",
")",
"==",
"STRING",
")",
"{",
"return",
"temp",
"."... | Returns the string in a given resource at the specified index.
@param index an index to the wanted string.
@return a string which lives in the resource.
@throws IndexOutOfBoundsException If the index value is out of bounds of accepted values.
@throws UResourceTypeMismatchException If resource bundle type mismatch. | [
"Returns",
"the",
"string",
"in",
"a",
"given",
"resource",
"at",
"the",
"specified",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L528-L534 |
35,646 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.findTopLevel | @Deprecated
protected UResourceBundle findTopLevel(int index) {
// NOTE: this _barely_ works for top-level resources. For resources at lower
// levels, it fails when you fall back to the parent, since you're now
// looking at root resources, not at the corresponding nested resource.
... | java | @Deprecated
protected UResourceBundle findTopLevel(int index) {
// NOTE: this _barely_ works for top-level resources. For resources at lower
// levels, it fails when you fall back to the parent, since you're now
// looking at root resources, not at the corresponding nested resource.
... | [
"@",
"Deprecated",
"protected",
"UResourceBundle",
"findTopLevel",
"(",
"int",
"index",
")",
"{",
"// NOTE: this _barely_ works for top-level resources. For resources at lower",
"// levels, it fails when you fall back to the parent, since you're now",
"// looking at root resources, not at t... | Returns a resource in a given resource that has a given index, or null if the
resource is not found.
@param index the index of the resource
@return the resource, or null
@see #get(int)
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Returns",
"a",
"resource",
"in",
"a",
"given",
"resource",
"that",
"has",
"a",
"given",
"index",
"or",
"null",
"if",
"the",
"resource",
"is",
"not",
"found",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L570-L585 |
35,647 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.keySet | @Override
@Deprecated
public Set<String> keySet() {
// TODO: Java 6 ResourceBundle has keySet() which calls handleKeySet()
// and caches the results.
// When we upgrade to Java 6, we still need to check for isTopLevelResource().
// Keep the else branch as is. The if body should j... | java | @Override
@Deprecated
public Set<String> keySet() {
// TODO: Java 6 ResourceBundle has keySet() which calls handleKeySet()
// and caches the results.
// When we upgrade to Java 6, we still need to check for isTopLevelResource().
// Keep the else branch as is. The if body should j... | [
"@",
"Override",
"@",
"Deprecated",
"public",
"Set",
"<",
"String",
">",
"keySet",
"(",
")",
"{",
"// TODO: Java 6 ResourceBundle has keySet() which calls handleKeySet()",
"// and caches the results.",
"// When we upgrade to Java 6, we still need to check for isTopLevelResource().",
... | Returns a Set of all keys contained in this ResourceBundle and its parent bundles.
@return a Set of all keys contained in this ResourceBundle and its parent bundles,
which is empty if this is not a bundle or a table resource
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on A... | [
"Returns",
"a",
"Set",
"of",
"all",
"keys",
"contained",
"in",
"this",
"ResourceBundle",
"and",
"its",
"parent",
"bundles",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L604-L646 |
35,648 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.handleGetObjectImpl | private Object handleGetObjectImpl(String aKey, UResourceBundle requested) {
Object obj = resolveObject(aKey, requested);
if (obj == null) {
UResourceBundle parentBundle = getParent();
if (parentBundle != null) {
obj = parentBundle.handleGetObjectImpl(aKey, reques... | java | private Object handleGetObjectImpl(String aKey, UResourceBundle requested) {
Object obj = resolveObject(aKey, requested);
if (obj == null) {
UResourceBundle parentBundle = getParent();
if (parentBundle != null) {
obj = parentBundle.handleGetObjectImpl(aKey, reques... | [
"private",
"Object",
"handleGetObjectImpl",
"(",
"String",
"aKey",
",",
"UResourceBundle",
"requested",
")",
"{",
"Object",
"obj",
"=",
"resolveObject",
"(",
"aKey",
",",
"requested",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"UResourceBundle",
"pa... | done twice before throwing a MissingResourceExpection. | [
"done",
"twice",
"before",
"throwing",
"a",
"MissingResourceExpection",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L822-L836 |
35,649 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java | UResourceBundle.resolveObject | private Object resolveObject(String aKey, UResourceBundle requested) {
if (getType() == STRING) {
return getString();
}
UResourceBundle obj = handleGet(aKey, null, requested);
if (obj != null) {
if (obj.getType() == STRING) {
return obj.getString()... | java | private Object resolveObject(String aKey, UResourceBundle requested) {
if (getType() == STRING) {
return getString();
}
UResourceBundle obj = handleGet(aKey, null, requested);
if (obj != null) {
if (obj.getType() == STRING) {
return obj.getString()... | [
"private",
"Object",
"resolveObject",
"(",
"String",
"aKey",
",",
"UResourceBundle",
"requested",
")",
"{",
"if",
"(",
"getType",
"(",
")",
"==",
"STRING",
")",
"{",
"return",
"getString",
"(",
")",
";",
"}",
"UResourceBundle",
"obj",
"=",
"handleGet",
"("... | string or string array | [
"string",
"or",
"string",
"array"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundle.java#L840-L858 |
35,650 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/client/HttpClient.java | HttpClient.newClient | public static HttpClient<ByteBuf, ByteBuf> newClient(String host, int port) {
return newClient(new InetSocketAddress(host, port));
} | java | public static HttpClient<ByteBuf, ByteBuf> newClient(String host, int port) {
return newClient(new InetSocketAddress(host, port));
} | [
"public",
"static",
"HttpClient",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"newClient",
"(",
"String",
"host",
",",
"int",
"port",
")",
"{",
"return",
"newClient",
"(",
"new",
"InetSocketAddress",
"(",
"host",
",",
"port",
")",
")",
";",
"}"
] | Creates a new HTTP client instance with the passed host and port for the target server.
@param host Hostname for the target server.
@param port Port for the target server.
@return A new {@code HttpClient} instance. | [
"Creates",
"a",
"new",
"HTTP",
"client",
"instance",
"with",
"the",
"passed",
"host",
"and",
"port",
"for",
"the",
"target",
"server",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/client/HttpClient.java#L316-L318 |
35,651 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/client/HttpClient.java | HttpClient.newClient | public static HttpClient<ByteBuf, ByteBuf> newClient(ConnectionProviderFactory<ByteBuf, ByteBuf> providerFactory,
Observable<Host> hostStream) {
return HttpClientImpl.create(providerFactory, hostStream);
} | java | public static HttpClient<ByteBuf, ByteBuf> newClient(ConnectionProviderFactory<ByteBuf, ByteBuf> providerFactory,
Observable<Host> hostStream) {
return HttpClientImpl.create(providerFactory, hostStream);
} | [
"public",
"static",
"HttpClient",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"newClient",
"(",
"ConnectionProviderFactory",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"providerFactory",
",",
"Observable",
"<",
"Host",
">",
"hostStream",
")",
"{",
"return",
"HttpClientImpl",
... | Creates a new HTTP client instance using the supplied connection provider.
@param providerFactory {@link ConnectionProviderFactory} for the client.
@param hostStream Stream of hosts for the client.
@return A new {@code HttpClient} instance. | [
"Creates",
"a",
"new",
"HTTP",
"client",
"instance",
"using",
"the",
"supplied",
"connection",
"provider",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/client/HttpClient.java#L339-L342 |
35,652 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/server/HttpServerInterceptorChain.java | HttpServerInterceptorChain.start | public static <R, W> HttpServerInterceptorChain<R, W, R, W> start() {
return new HttpServerInterceptorChain<>(new TransformingInterceptor<R, W, R, W>() {
@Override
public RequestHandler<R, W> intercept(RequestHandler<R, W> handler) {
return handler;
}
... | java | public static <R, W> HttpServerInterceptorChain<R, W, R, W> start() {
return new HttpServerInterceptorChain<>(new TransformingInterceptor<R, W, R, W>() {
@Override
public RequestHandler<R, W> intercept(RequestHandler<R, W> handler) {
return handler;
}
... | [
"public",
"static",
"<",
"R",
",",
"W",
">",
"HttpServerInterceptorChain",
"<",
"R",
",",
"W",
",",
"R",
",",
"W",
">",
"start",
"(",
")",
"{",
"return",
"new",
"HttpServerInterceptorChain",
"<>",
"(",
"new",
"TransformingInterceptor",
"<",
"R",
",",
"W"... | Starts a new interceptor chain.
@return A new interceptor chain. | [
"Starts",
"a",
"new",
"interceptor",
"chain",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/server/HttpServerInterceptorChain.java#L205-L212 |
35,653 | ReactiveX/RxNetty | rxnetty-examples/src/main/java/io/reactivex/netty/examples/tcp/interceptors/simple/InterceptingServer.java | InterceptingServer.sendHello | private static Interceptor<ByteBuf, ByteBuf> sendHello() {
return in -> newConnection -> newConnection.writeString(Observable.just("Hello\n"))
.concatWith(in.handle(newConnection));
} | java | private static Interceptor<ByteBuf, ByteBuf> sendHello() {
return in -> newConnection -> newConnection.writeString(Observable.just("Hello\n"))
.concatWith(in.handle(newConnection));
} | [
"private",
"static",
"Interceptor",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"sendHello",
"(",
")",
"{",
"return",
"in",
"->",
"newConnection",
"->",
"newConnection",
".",
"writeString",
"(",
"Observable",
".",
"just",
"(",
"\"Hello\\n\"",
")",
")",
".",
"concat... | Sends a hello on accepting a new connection. | [
"Sends",
"a",
"hello",
"on",
"accepting",
"a",
"new",
"connection",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-examples/src/main/java/io/reactivex/netty/examples/tcp/interceptors/simple/InterceptingServer.java#L70-L73 |
35,654 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java | TrailingHeaders.setHeader | public TrailingHeaders setHeader(CharSequence name, Object value) {
lastHttpContent.trailingHeaders().set(name, value);
return this;
} | java | public TrailingHeaders setHeader(CharSequence name, Object value) {
lastHttpContent.trailingHeaders().set(name, value);
return this;
} | [
"public",
"TrailingHeaders",
"setHeader",
"(",
"CharSequence",
"name",
",",
"Object",
"value",
")",
"{",
"lastHttpContent",
".",
"trailingHeaders",
"(",
")",
".",
"set",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Overwrites the current value, if any, of the passed trailing header to the passed value for this request.
@param name Name of the header.
@param value Value of the header.
@return {@code this}. | [
"Overwrites",
"the",
"current",
"value",
"if",
"any",
"of",
"the",
"passed",
"trailing",
"header",
"to",
"the",
"passed",
"value",
"for",
"this",
"request",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java#L75-L78 |
35,655 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java | TrailingHeaders.setHeader | public TrailingHeaders setHeader(CharSequence name, Iterable<Object> values) {
lastHttpContent.trailingHeaders().set(name, values);
return this;
} | java | public TrailingHeaders setHeader(CharSequence name, Iterable<Object> values) {
lastHttpContent.trailingHeaders().set(name, values);
return this;
} | [
"public",
"TrailingHeaders",
"setHeader",
"(",
"CharSequence",
"name",
",",
"Iterable",
"<",
"Object",
">",
"values",
")",
"{",
"lastHttpContent",
".",
"trailingHeaders",
"(",
")",
".",
"set",
"(",
"name",
",",
"values",
")",
";",
"return",
"this",
";",
"}... | Overwrites the current value, if any, of the passed trailing header to the passed values for this request.
@param name Name of the header.
@param values Values of the header.
@return {@code this}. | [
"Overwrites",
"the",
"current",
"value",
"if",
"any",
"of",
"the",
"passed",
"trailing",
"header",
"to",
"the",
"passed",
"values",
"for",
"this",
"request",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java#L88-L91 |
35,656 | ReactiveX/RxNetty | rxnetty-common/src/main/java/io/reactivex/netty/channel/DisposableContentSource.java | DisposableContentSource.dispose | public void dispose() {
if (onSubscribe.disposed.compareAndSet(false, true)) {
for (Object chunk : onSubscribe.chunks) {
ReferenceCountUtil.release(chunk);
}
onSubscribe.chunks.clear();
}
} | java | public void dispose() {
if (onSubscribe.disposed.compareAndSet(false, true)) {
for (Object chunk : onSubscribe.chunks) {
ReferenceCountUtil.release(chunk);
}
onSubscribe.chunks.clear();
}
} | [
"public",
"void",
"dispose",
"(",
")",
"{",
"if",
"(",
"onSubscribe",
".",
"disposed",
".",
"compareAndSet",
"(",
"false",
",",
"true",
")",
")",
"{",
"for",
"(",
"Object",
"chunk",
":",
"onSubscribe",
".",
"chunks",
")",
"{",
"ReferenceCountUtil",
".",
... | Disposes this source. | [
"Disposes",
"this",
"source",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-common/src/main/java/io/reactivex/netty/channel/DisposableContentSource.java#L74-L81 |
35,657 | ReactiveX/RxNetty | rxnetty-common/src/main/java/io/reactivex/netty/client/pool/PooledConnection.java | PooledConnection.reuse | public void reuse(Subscriber<? super PooledConnection<R, W>> connectionSubscriber) {
unsafeNettyChannel().pipeline().fireUserEventTriggered(new ConnectionReuseEvent<>(connectionSubscriber, this));
} | java | public void reuse(Subscriber<? super PooledConnection<R, W>> connectionSubscriber) {
unsafeNettyChannel().pipeline().fireUserEventTriggered(new ConnectionReuseEvent<>(connectionSubscriber, this));
} | [
"public",
"void",
"reuse",
"(",
"Subscriber",
"<",
"?",
"super",
"PooledConnection",
"<",
"R",
",",
"W",
">",
">",
"connectionSubscriber",
")",
"{",
"unsafeNettyChannel",
"(",
")",
".",
"pipeline",
"(",
")",
".",
"fireUserEventTriggered",
"(",
"new",
"Connec... | This method must be called for reusing the connection i.e. for sending this connection to the passed subscriber.
@param connectionSubscriber Subscriber for the pooled connection for reuse. | [
"This",
"method",
"must",
"be",
"called",
"for",
"reusing",
"the",
"connection",
"i",
".",
"e",
".",
"for",
"sending",
"this",
"connection",
"to",
"the",
"passed",
"subscriber",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-common/src/main/java/io/reactivex/netty/client/pool/PooledConnection.java#L314-L316 |
35,658 | ReactiveX/RxNetty | rxnetty-tcp/src/main/java/io/reactivex/netty/protocol/tcp/client/TcpClient.java | TcpClient.newClient | public static TcpClient<ByteBuf, ByteBuf> newClient(ConnectionProviderFactory<ByteBuf, ByteBuf> providerFactory,
Observable<Host> hostStream) {
return TcpClientImpl.create(providerFactory, hostStream);
} | java | public static TcpClient<ByteBuf, ByteBuf> newClient(ConnectionProviderFactory<ByteBuf, ByteBuf> providerFactory,
Observable<Host> hostStream) {
return TcpClientImpl.create(providerFactory, hostStream);
} | [
"public",
"static",
"TcpClient",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"newClient",
"(",
"ConnectionProviderFactory",
"<",
"ByteBuf",
",",
"ByteBuf",
">",
"providerFactory",
",",
"Observable",
"<",
"Host",
">",
"hostStream",
")",
"{",
"return",
"TcpClientImpl",
"... | Creates a new TCP client instance using the supplied connection provider.
@param providerFactory {@link ConnectionProviderFactory} for the client.
@param hostStream Stream of hosts for the client.
@return A new {@code TcpClient} instance. | [
"Creates",
"a",
"new",
"TCP",
"client",
"instance",
"using",
"the",
"supplied",
"connection",
"provider",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-tcp/src/main/java/io/reactivex/netty/protocol/tcp/client/TcpClient.java#L357-L360 |
35,659 | ReactiveX/RxNetty | rxnetty-common/src/main/java/io/reactivex/netty/channel/Connection.java | Connection.ignoreInput | public Observable<Void> ignoreInput() {
return getInput().map(new Func1<R, Void>() {
@Override
public Void call(R r) {
ReferenceCountUtil.release(r);
return null;
}
}).ignoreElements();
} | java | public Observable<Void> ignoreInput() {
return getInput().map(new Func1<R, Void>() {
@Override
public Void call(R r) {
ReferenceCountUtil.release(r);
return null;
}
}).ignoreElements();
} | [
"public",
"Observable",
"<",
"Void",
">",
"ignoreInput",
"(",
")",
"{",
"return",
"getInput",
"(",
")",
".",
"map",
"(",
"new",
"Func1",
"<",
"R",
",",
"Void",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"Void",
"call",
"(",
"R",
"r",
")",
"{"... | Ignores all input on this connection.
Unless, {@link ChannelOption#AUTO_READ} is set to {@code true}, the content will only be read from the
underneath channel, if there is a subscriber to the input. So, upon recieving this connection, either one should
call this method or eventually subscribe to the stream returned b... | [
"Ignores",
"all",
"input",
"on",
"this",
"connection",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-common/src/main/java/io/reactivex/netty/channel/Connection.java#L104-L112 |
35,660 | ReactiveX/RxNetty | rxnetty-common/src/main/java/io/reactivex/netty/client/pool/CompositePoolLimitDeterminationStrategy.java | CompositePoolLimitDeterminationStrategy.getAvailablePermits | @Override
public int getAvailablePermits() {
int minPermits = Integer.MAX_VALUE;
for (PoolLimitDeterminationStrategy strategy : strategies) {
int availablePermits = strategy.getAvailablePermits();
minPermits = Math.min(minPermits, availablePermits);
}
return m... | java | @Override
public int getAvailablePermits() {
int minPermits = Integer.MAX_VALUE;
for (PoolLimitDeterminationStrategy strategy : strategies) {
int availablePermits = strategy.getAvailablePermits();
minPermits = Math.min(minPermits, availablePermits);
}
return m... | [
"@",
"Override",
"public",
"int",
"getAvailablePermits",
"(",
")",
"{",
"int",
"minPermits",
"=",
"Integer",
".",
"MAX_VALUE",
";",
"for",
"(",
"PoolLimitDeterminationStrategy",
"strategy",
":",
"strategies",
")",
"{",
"int",
"availablePermits",
"=",
"strategy",
... | Returns the minimum number of permits available across all strategies.
@return The minimum number of permits available across all strategies. | [
"Returns",
"the",
"minimum",
"number",
"of",
"permits",
"available",
"across",
"all",
"strategies",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-common/src/main/java/io/reactivex/netty/client/pool/CompositePoolLimitDeterminationStrategy.java#L59-L67 |
35,661 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/server/UriInfoHolder.java | UriInfoHolder.getPath | private static String getPath(String uri) {
int offset = 0;
if (uri.startsWith("http://")) {
offset = "http://".length();
} else if (uri.startsWith("https://")) {
offset = "https://".length();
}
if (offset == 0) {
return uri;
} else {
... | java | private static String getPath(String uri) {
int offset = 0;
if (uri.startsWith("http://")) {
offset = "http://".length();
} else if (uri.startsWith("https://")) {
offset = "https://".length();
}
if (offset == 0) {
return uri;
} else {
... | [
"private",
"static",
"String",
"getPath",
"(",
"String",
"uri",
")",
"{",
"int",
"offset",
"=",
"0",
";",
"if",
"(",
"uri",
".",
"startsWith",
"(",
"\"http://\"",
")",
")",
"{",
"offset",
"=",
"\"http://\"",
".",
"length",
"(",
")",
";",
"}",
"else",... | start of the path. | [
"start",
"of",
"the",
"path",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/server/UriInfoHolder.java#L48-L62 |
35,662 | ReactiveX/RxNetty | rxnetty-common/src/main/java/io/reactivex/netty/events/Clock.java | Clock.getDuration | public long getDuration(TimeUnit targetUnit) {
if (isRunning()) {
throw new IllegalStateException("The clock is not yet stopped.");
}
return targetUnit.convert(durationNanos, TimeUnit.NANOSECONDS);
} | java | public long getDuration(TimeUnit targetUnit) {
if (isRunning()) {
throw new IllegalStateException("The clock is not yet stopped.");
}
return targetUnit.convert(durationNanos, TimeUnit.NANOSECONDS);
} | [
"public",
"long",
"getDuration",
"(",
"TimeUnit",
"targetUnit",
")",
"{",
"if",
"(",
"isRunning",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"The clock is not yet stopped.\"",
")",
";",
"}",
"return",
"targetUnit",
".",
"convert",
"(",
... | Returns the duration for which this clock was running in the given timeunit.
@return The duration for which this clock was running in the given timeunit.
@throws IllegalStateException If the clock is not yet stopped. | [
"Returns",
"the",
"duration",
"for",
"which",
"this",
"clock",
"was",
"running",
"in",
"the",
"given",
"timeunit",
"."
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-common/src/main/java/io/reactivex/netty/events/Clock.java#L97-L102 |
35,663 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/ws/internal/WsUtils.java | WsUtils.sha1 | public static byte[] sha1(byte[] data) {
try {
//Attempt to get a MessageDigest that uses SHA1
MessageDigest md = MessageDigest.getInstance("SHA1");
//Hash the data
return md.digest(data);
} catch (NoSuchAlgorithmException e) {
//Alright, you m... | java | public static byte[] sha1(byte[] data) {
try {
//Attempt to get a MessageDigest that uses SHA1
MessageDigest md = MessageDigest.getInstance("SHA1");
//Hash the data
return md.digest(data);
} catch (NoSuchAlgorithmException e) {
//Alright, you m... | [
"public",
"static",
"byte",
"[",
"]",
"sha1",
"(",
"byte",
"[",
"]",
"data",
")",
"{",
"try",
"{",
"//Attempt to get a MessageDigest that uses SHA1",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA1\"",
")",
";",
"//Hash the data",
"... | Performs a SHA-1 hash on the specified data
@param data The data to hash
@return The hashed data | [
"Performs",
"a",
"SHA",
"-",
"1",
"hash",
"on",
"the",
"specified",
"data"
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/ws/internal/WsUtils.java#L41-L51 |
35,664 | ReactiveX/RxNetty | rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/ws/internal/WsUtils.java | WsUtils.randomBytes | public static byte[] randomBytes(int size) {
byte[] bytes = new byte[size];
for (int index = 0; index < size; index++) {
bytes[index] = (byte) randomNumber(0, 255);
}
return bytes;
} | java | public static byte[] randomBytes(int size) {
byte[] bytes = new byte[size];
for (int index = 0; index < size; index++) {
bytes[index] = (byte) randomNumber(0, 255);
}
return bytes;
} | [
"public",
"static",
"byte",
"[",
"]",
"randomBytes",
"(",
"int",
"size",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"size",
"]",
";",
"for",
"(",
"int",
"index",
"=",
"0",
";",
"index",
"<",
"size",
";",
"index",
"++",
")",
"... | Creates an arbitrary number of random bytes
@param size the number of random bytes to create
@return An array of random bytes | [
"Creates",
"an",
"arbitrary",
"number",
"of",
"random",
"bytes"
] | a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6 | https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/ws/internal/WsUtils.java#L73-L81 |
35,665 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/util/Utils.java | Utils.isSelinuxFlagInEnabled | public static boolean isSelinuxFlagInEnabled() {
try {
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class);
String selinux = (String) get.invoke(c, "ro.build.selinux");
return "1".equals(selinux);
} catc... | java | public static boolean isSelinuxFlagInEnabled() {
try {
Class<?> c = Class.forName("android.os.SystemProperties");
Method get = c.getMethod("get", String.class);
String selinux = (String) get.invoke(c, "ro.build.selinux");
return "1".equals(selinux);
} catc... | [
"public",
"static",
"boolean",
"isSelinuxFlagInEnabled",
"(",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"c",
"=",
"Class",
".",
"forName",
"(",
"\"android.os.SystemProperties\"",
")",
";",
"Method",
"get",
"=",
"c",
".",
"getMethod",
"(",
"\"get\"",
",... | In Development - an idea of ours was to check the if selinux is enforcing - this could be disabled for some rooting apps
Checking for selinux mode
@return true if selinux enabled | [
"In",
"Development",
"-",
"an",
"idea",
"of",
"ours",
"was",
"to",
"check",
"the",
"if",
"selinux",
"is",
"enforcing",
"-",
"this",
"could",
"be",
"disabled",
"for",
"some",
"rooting",
"apps",
"Checking",
"for",
"selinux",
"mode"
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/util/Utils.java#L19-L29 |
35,666 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.isRootedWithoutBusyBoxCheck | public boolean isRootedWithoutBusyBoxCheck() {
return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU)
|| checkForDangerousProps() || checkForRWPaths()
|| detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBina... | java | public boolean isRootedWithoutBusyBoxCheck() {
return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU)
|| checkForDangerousProps() || checkForRWPaths()
|| detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBina... | [
"public",
"boolean",
"isRootedWithoutBusyBoxCheck",
"(",
")",
"{",
"return",
"detectRootManagementApps",
"(",
")",
"||",
"detectPotentiallyDangerousApps",
"(",
")",
"||",
"checkForBinary",
"(",
"BINARY_SU",
")",
"||",
"checkForDangerousProps",
"(",
")",
"||",
"checkFo... | Run all the checks apart from checking for the busybox binary. This is because it can sometimes be a false positive
as some manufacturers leave the binary in production builds.
@return true, we think there's a good *indication* of root | false good *indication* of no root (could still be cloaked) | [
"Run",
"all",
"the",
"checks",
"apart",
"from",
"checking",
"for",
"the",
"busybox",
"binary",
".",
"This",
"is",
"because",
"it",
"can",
"sometimes",
"be",
"a",
"false",
"positive",
"as",
"some",
"manufacturers",
"leave",
"the",
"binary",
"in",
"production"... | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L56-L61 |
35,667 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.detectRootManagementApps | public boolean detectRootManagementApps(String[] additionalRootManagementApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>(Arrays.asList(Const.knownRootAppsPackages));
if (additionalRootManagementApps!=null ... | java | public boolean detectRootManagementApps(String[] additionalRootManagementApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>(Arrays.asList(Const.knownRootAppsPackages));
if (additionalRootManagementApps!=null ... | [
"public",
"boolean",
"detectRootManagementApps",
"(",
"String",
"[",
"]",
"additionalRootManagementApps",
")",
"{",
"// Create a list of package names to iterate over from constants any others provided",
"ArrayList",
"<",
"String",
">",
"packages",
"=",
"new",
"ArrayList",
"<>"... | Using the PackageManager, check for a list of well known root apps. @link {Const.knownRootAppsPackages}
@param additionalRootManagementApps - array of additional packagenames to search for
@return true if one of the apps it's installed | [
"Using",
"the",
"PackageManager",
"check",
"for",
"a",
"list",
"of",
"well",
"known",
"root",
"apps",
"."
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L87-L96 |
35,668 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.detectPotentiallyDangerousApps | public boolean detectPotentiallyDangerousApps(String[] additionalDangerousApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>();
packages.addAll(Arrays.asList(Const.knownDangerousAppsPackages));
if (ad... | java | public boolean detectPotentiallyDangerousApps(String[] additionalDangerousApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>();
packages.addAll(Arrays.asList(Const.knownDangerousAppsPackages));
if (ad... | [
"public",
"boolean",
"detectPotentiallyDangerousApps",
"(",
"String",
"[",
"]",
"additionalDangerousApps",
")",
"{",
"// Create a list of package names to iterate over from constants any others provided",
"ArrayList",
"<",
"String",
">",
"packages",
"=",
"new",
"ArrayList",
"<>... | Using the PackageManager, check for a list of well known apps that require root. @link {Const.knownRootAppsPackages}
@param additionalDangerousApps - array of additional packagenames to search for
@return true if one of the apps it's installed | [
"Using",
"the",
"PackageManager",
"check",
"for",
"a",
"list",
"of",
"well",
"known",
"apps",
"that",
"require",
"root",
"."
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L111-L121 |
35,669 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.detectRootCloakingApps | public boolean detectRootCloakingApps(String[] additionalRootCloakingApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>(Arrays.asList(Const.knownRootCloakingPackages));
if (additionalRootCloakingApps!=null &&... | java | public boolean detectRootCloakingApps(String[] additionalRootCloakingApps) {
// Create a list of package names to iterate over from constants any others provided
ArrayList<String> packages = new ArrayList<>(Arrays.asList(Const.knownRootCloakingPackages));
if (additionalRootCloakingApps!=null &&... | [
"public",
"boolean",
"detectRootCloakingApps",
"(",
"String",
"[",
"]",
"additionalRootCloakingApps",
")",
"{",
"// Create a list of package names to iterate over from constants any others provided",
"ArrayList",
"<",
"String",
">",
"packages",
"=",
"new",
"ArrayList",
"<>",
... | Using the PackageManager, check for a list of well known root cloak apps. @link {Const.knownRootAppsPackages}
@param additionalRootCloakingApps - array of additional packagenames to search for
@return true if one of the apps it's installed | [
"Using",
"the",
"PackageManager",
"check",
"for",
"a",
"list",
"of",
"well",
"known",
"root",
"cloak",
"apps",
"."
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L137-L145 |
35,670 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.isAnyPackageFromListInstalled | private boolean isAnyPackageFromListInstalled(List<String> packages){
boolean result = false;
PackageManager pm = mContext.getPackageManager();
for (String packageName : packages) {
try {
// Root app detected
pm.getPackageInfo(packageName, 0);
... | java | private boolean isAnyPackageFromListInstalled(List<String> packages){
boolean result = false;
PackageManager pm = mContext.getPackageManager();
for (String packageName : packages) {
try {
// Root app detected
pm.getPackageInfo(packageName, 0);
... | [
"private",
"boolean",
"isAnyPackageFromListInstalled",
"(",
"List",
"<",
"String",
">",
"packages",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"PackageManager",
"pm",
"=",
"mContext",
".",
"getPackageManager",
"(",
")",
";",
"for",
"(",
"String",
"packa... | Check if any package in the list is installed
@param packages - list of packages to search for
@return true if any of the packages are installed | [
"Check",
"if",
"any",
"package",
"in",
"the",
"list",
"is",
"installed"
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L231-L248 |
35,671 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.checkForDangerousProps | public boolean checkForDangerousProps() {
final Map<String, String> dangerousProps = new HashMap<>();
dangerousProps.put("ro.debuggable", "1");
dangerousProps.put("ro.secure", "0");
boolean result = false;
String[] lines = propsReader();
if (lines == null){
... | java | public boolean checkForDangerousProps() {
final Map<String, String> dangerousProps = new HashMap<>();
dangerousProps.put("ro.debuggable", "1");
dangerousProps.put("ro.secure", "0");
boolean result = false;
String[] lines = propsReader();
if (lines == null){
... | [
"public",
"boolean",
"checkForDangerousProps",
"(",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"dangerousProps",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"dangerousProps",
".",
"put",
"(",
"\"ro.debuggable\"",
",",
"\"1\"",
")",
";",
"... | Checks for several system properties for
@return - true if dangerous props are found | [
"Checks",
"for",
"several",
"system",
"properties",
"for"
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L254-L282 |
35,672 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.checkForRWPaths | public boolean checkForRWPaths() {
boolean result = false;
String[] lines = mountReader();
if (lines == null){
// Could not read, assume false;
return false;
}
for (String line : lines) {
// Split lines into parts
String[] args... | java | public boolean checkForRWPaths() {
boolean result = false;
String[] lines = mountReader();
if (lines == null){
// Could not read, assume false;
return false;
}
for (String line : lines) {
// Split lines into parts
String[] args... | [
"public",
"boolean",
"checkForRWPaths",
"(",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"String",
"[",
"]",
"lines",
"=",
"mountReader",
"(",
")",
";",
"if",
"(",
"lines",
"==",
"null",
")",
"{",
"// Could not read, assume false;",
"return",
"false",
... | When you're root you can change the permissions on common system directories, this method checks if any of these patha Const.pathsThatShouldNotBeWrtiable are writable.
@return true if one of the dir is writable | [
"When",
"you",
"re",
"root",
"you",
"can",
"change",
"the",
"permissions",
"on",
"common",
"system",
"directories",
"this",
"method",
"checks",
"if",
"any",
"of",
"these",
"patha",
"Const",
".",
"pathsThatShouldNotBeWrtiable",
"are",
"writable",
"."
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L288-L330 |
35,673 | scottyab/rootbeer | rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java | RootBeer.checkSuExists | public boolean checkSuExists() {
Process process = null;
try {
process = Runtime.getRuntime().exec(new String[] { "which", BINARY_SU });
BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
return in.readLine() != null;
} ca... | java | public boolean checkSuExists() {
Process process = null;
try {
process = Runtime.getRuntime().exec(new String[] { "which", BINARY_SU });
BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
return in.readLine() != null;
} ca... | [
"public",
"boolean",
"checkSuExists",
"(",
")",
"{",
"Process",
"process",
"=",
"null",
";",
"try",
"{",
"process",
"=",
"Runtime",
".",
"getRuntime",
"(",
")",
".",
"exec",
"(",
"new",
"String",
"[",
"]",
"{",
"\"which\"",
",",
"BINARY_SU",
"}",
")",
... | A variation on the checking for SU, this attempts a 'which su'
@return true if su found | [
"A",
"variation",
"on",
"the",
"checking",
"for",
"SU",
"this",
"attempts",
"a",
"which",
"su"
] | 8b985d927ff18acc804440a84c6d2b5efee0c6d9 | https://github.com/scottyab/rootbeer/blob/8b985d927ff18acc804440a84c6d2b5efee0c6d9/rootbeerlib/src/main/java/com/scottyab/rootbeer/RootBeer.java#L337-L348 |
35,674 | Azure/azure-sdk-for-java | sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionPoliciesInner.java | BackupLongTermRetentionPoliciesInner.getAsync | public Observable<BackupLongTermRetentionPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) {
return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<BackupLongTermRetentionPolicyInner>, BackupLongTermRetentionPolicyInner... | java | public Observable<BackupLongTermRetentionPolicyInner> getAsync(String resourceGroupName, String serverName, String databaseName) {
return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<BackupLongTermRetentionPolicyInner>, BackupLongTermRetentionPolicyInner... | [
"public",
"Observable",
"<",
"BackupLongTermRetentionPolicyInner",
">",
"getAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"String",
"databaseName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serverNam... | Returns a database backup long term retention policy.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param databaseName The name of the database.
@throws IllegalA... | [
"Returns",
"a",
"database",
"backup",
"long",
"term",
"retention",
"policy",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/BackupLongTermRetentionPoliciesInner.java#L114-L121 |
35,675 | Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java | MessageSecurityHelper.bytesToBase64Url | public static String bytesToBase64Url(byte[] bytes) {
String result = (new String(Base64.encodeBase64(bytes), MESSAGE_ENCODING)).replace("=", "").replace("\\", "").replace('+', '-')
.replace('/', '_');
return result;
} | java | public static String bytesToBase64Url(byte[] bytes) {
String result = (new String(Base64.encodeBase64(bytes), MESSAGE_ENCODING)).replace("=", "").replace("\\", "").replace('+', '-')
.replace('/', '_');
return result;
} | [
"public",
"static",
"String",
"bytesToBase64Url",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"String",
"result",
"=",
"(",
"new",
"String",
"(",
"Base64",
".",
"encodeBase64",
"(",
"bytes",
")",
",",
"MESSAGE_ENCODING",
")",
")",
".",
"replace",
"(",
"\"=... | Convert bytes array to Base64Url string.
@param bytes
bytes array
@returns Encoded string. | [
"Convert",
"bytes",
"array",
"to",
"Base64Url",
"string",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java#L67-L71 |
35,676 | Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java | MessageSecurityHelper.jsonWebKeyFromString | public static JsonWebKey jsonWebKeyFromString(String jwkString) throws IOException {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(jwkString, JsonWebKey.class);
} | java | public static JsonWebKey jsonWebKeyFromString(String jwkString) throws IOException {
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(jwkString, JsonWebKey.class);
} | [
"public",
"static",
"JsonWebKey",
"jsonWebKeyFromString",
"(",
"String",
"jwkString",
")",
"throws",
"IOException",
"{",
"ObjectMapper",
"mapper",
"=",
"new",
"ObjectMapper",
"(",
")",
";",
"return",
"mapper",
".",
"readValue",
"(",
"jwkString",
",",
"JsonWebKey",... | Convert serialized JsonWebKey string to JsonWebKey object.
@param jwkString
serialized JsonWebKey.
@returns JsonWebKey object. | [
"Convert",
"serialized",
"JsonWebKey",
"string",
"to",
"JsonWebKey",
"object",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java#L93-L96 |
35,677 | Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java | MessageSecurityHelper.generateJsonWebKey | public static JsonWebKey generateJsonWebKey() {
try {
final KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
generator.initialize(2048);
KeyPair clientRsaKeyPair = generator.generateKeyPair();
JsonWebKey result = JsonWebKey.fromRSA(clientRsaKeyPai... | java | public static JsonWebKey generateJsonWebKey() {
try {
final KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA");
generator.initialize(2048);
KeyPair clientRsaKeyPair = generator.generateKeyPair();
JsonWebKey result = JsonWebKey.fromRSA(clientRsaKeyPai... | [
"public",
"static",
"JsonWebKey",
"generateJsonWebKey",
"(",
")",
"{",
"try",
"{",
"final",
"KeyPairGenerator",
"generator",
"=",
"KeyPairGenerator",
".",
"getInstance",
"(",
"\"RSA\"",
")",
";",
"generator",
".",
"initialize",
"(",
"2048",
")",
";",
"KeyPair",
... | Generates new JsonWebKey with random KeyID.
@returns JsonWebKey object. | [
"Generates",
"new",
"JsonWebKey",
"with",
"random",
"KeyID",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java#L103-L115 |
35,678 | Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java | MessageSecurityHelper.getJwkWithPublicKeyOnly | public static JsonWebKey getJwkWithPublicKeyOnly(JsonWebKey jwk) {
KeyPair publicOnly = jwk.toRSA(false);
JsonWebKey jsonkeyPublic = JsonWebKey.fromRSA(publicOnly);
jsonkeyPublic.withKid(jwk.kid());
jsonkeyPublic.withKeyOps(
Arrays.asList(JsonWebKeyOperation.ENCRYPT, Json... | java | public static JsonWebKey getJwkWithPublicKeyOnly(JsonWebKey jwk) {
KeyPair publicOnly = jwk.toRSA(false);
JsonWebKey jsonkeyPublic = JsonWebKey.fromRSA(publicOnly);
jsonkeyPublic.withKid(jwk.kid());
jsonkeyPublic.withKeyOps(
Arrays.asList(JsonWebKeyOperation.ENCRYPT, Json... | [
"public",
"static",
"JsonWebKey",
"getJwkWithPublicKeyOnly",
"(",
"JsonWebKey",
"jwk",
")",
"{",
"KeyPair",
"publicOnly",
"=",
"jwk",
".",
"toRSA",
"(",
"false",
")",
";",
"JsonWebKey",
"jsonkeyPublic",
"=",
"JsonWebKey",
".",
"fromRSA",
"(",
"publicOnly",
")",
... | Converts JsonWebKey with private key to JsonWebKey with public key only.
@param jwk
JsonWebKey with private key.
@returns JsonWebKey object with public key only. | [
"Converts",
"JsonWebKey",
"with",
"private",
"key",
"to",
"JsonWebKey",
"with",
"public",
"key",
"only",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/messagesecurity/MessageSecurityHelper.java#L124-L131 |
35,679 | Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseOperationsInner.java | DatabaseOperationsInner.listByDatabaseNextAsync | public Observable<Page<DatabaseOperationInner>> listByDatabaseNextAsync(final String nextPageLink) {
return listByDatabaseNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<DatabaseOperationInner>>, Page<DatabaseOperationInner>>() {
@Override
... | java | public Observable<Page<DatabaseOperationInner>> listByDatabaseNextAsync(final String nextPageLink) {
return listByDatabaseNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<DatabaseOperationInner>>, Page<DatabaseOperationInner>>() {
@Override
... | [
"public",
"Observable",
"<",
"Page",
"<",
"DatabaseOperationInner",
">",
">",
"listByDatabaseNextAsync",
"(",
"final",
"String",
"nextPageLink",
")",
"{",
"return",
"listByDatabaseNextWithServiceResponseAsync",
"(",
"nextPageLink",
")",
".",
"map",
"(",
"new",
"Func1"... | Gets a list of operations performed on the database.
@param nextPageLink The NextLink from the previous successful call to List operation.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the PagedList<DatabaseOperationInner> object | [
"Gets",
"a",
"list",
"of",
"operations",
"performed",
"on",
"the",
"database",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseOperationsInner.java#L353-L361 |
35,680 | Azure/azure-sdk-for-java | applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java | APIKeysInner.listAsync | public Observable<List<ApplicationInsightsComponentAPIKeyInner>> listAsync(String resourceGroupName, String resourceName) {
return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentAPIKeyInner>>, List<ApplicationInsightsComponentAPIKeyIn... | java | public Observable<List<ApplicationInsightsComponentAPIKeyInner>> listAsync(String resourceGroupName, String resourceName) {
return listWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<List<ApplicationInsightsComponentAPIKeyInner>>, List<ApplicationInsightsComponentAPIKeyIn... | [
"public",
"Observable",
"<",
"List",
"<",
"ApplicationInsightsComponentAPIKeyInner",
">",
">",
"listAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"resourceName",
")",
"{",
"return",
"listWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"resourceName"... | Gets a list of API keys of an Application Insights component.
@param resourceGroupName The name of the resource group.
@param resourceName The name of the Application Insights component resource.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the List<Application... | [
"Gets",
"a",
"list",
"of",
"API",
"keys",
"of",
"an",
"Application",
"Insights",
"component",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/APIKeysInner.java#L113-L120 |
35,681 | Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/CertificateItem.java | CertificateItem.withX509Thumbprint | public CertificateItem withX509Thumbprint(byte[] x509Thumbprint) {
if (x509Thumbprint == null) {
this.x509Thumbprint = null;
} else {
this.x509Thumbprint = Base64Url.encode(x509Thumbprint);
}
return this;
} | java | public CertificateItem withX509Thumbprint(byte[] x509Thumbprint) {
if (x509Thumbprint == null) {
this.x509Thumbprint = null;
} else {
this.x509Thumbprint = Base64Url.encode(x509Thumbprint);
}
return this;
} | [
"public",
"CertificateItem",
"withX509Thumbprint",
"(",
"byte",
"[",
"]",
"x509Thumbprint",
")",
"{",
"if",
"(",
"x509Thumbprint",
"==",
"null",
")",
"{",
"this",
".",
"x509Thumbprint",
"=",
"null",
";",
"}",
"else",
"{",
"this",
".",
"x509Thumbprint",
"=",
... | Set the x509Thumbprint value.
@param x509Thumbprint the x509Thumbprint value to set
@return the CertificateItem object itself. | [
"Set",
"the",
"x509Thumbprint",
"value",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/models/CertificateItem.java#L117-L124 |
35,682 | Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetsInner.java | SubnetsInner.beginDelete | public void beginDelete(String resourceGroupName, String virtualNetworkName, String subnetName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body();
} | java | public void beginDelete(String resourceGroupName, String virtualNetworkName, String subnetName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().body();
} | [
"public",
"void",
"beginDelete",
"(",
"String",
"resourceGroupName",
",",
"String",
"virtualNetworkName",
",",
"String",
"subnetName",
")",
"{",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"virtualNetworkName",
",",
"subnetName",
")",
".",
"toB... | Deletes the specified subnet.
@param resourceGroupName The name of the resource group.
@param virtualNetworkName The name of the virtual network.
@param subnetName The name of the subnet.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected ... | [
"Deletes",
"the",
"specified",
"subnet",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/SubnetsInner.java#L177-L179 |
35,683 | Azure/azure-sdk-for-java | network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPoliciesInner.java | ServiceEndpointPoliciesInner.beginDelete | public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body();
} | java | public void beginDelete(String resourceGroupName, String serviceEndpointPolicyName) {
beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName).toBlocking().single().body();
} | [
"public",
"void",
"beginDelete",
"(",
"String",
"resourceGroupName",
",",
"String",
"serviceEndpointPolicyName",
")",
"{",
"beginDeleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"serviceEndpointPolicyName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
... | Deletes the specified service endpoint policy.
@param resourceGroupName The name of the resource group.
@param serviceEndpointPolicyName The name of the service endpoint policy.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
... | [
"Deletes",
"the",
"specified",
"service",
"endpoint",
"policy",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPoliciesInner.java#L191-L193 |
35,684 | Azure/azure-sdk-for-java | mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java | ProtectionKey.getProtectionKeyId | public static EntityTypeActionOperation<String> getProtectionKeyId(
ContentKeyType contentKeyType) {
return new GetProtectionKeyIdActionOperation("GetProtectionKeyId")
.addQueryParameter("contentKeyType",
String.format("%d", contentKeyType.getCode()))
... | java | public static EntityTypeActionOperation<String> getProtectionKeyId(
ContentKeyType contentKeyType) {
return new GetProtectionKeyIdActionOperation("GetProtectionKeyId")
.addQueryParameter("contentKeyType",
String.format("%d", contentKeyType.getCode()))
... | [
"public",
"static",
"EntityTypeActionOperation",
"<",
"String",
">",
"getProtectionKeyId",
"(",
"ContentKeyType",
"contentKeyType",
")",
"{",
"return",
"new",
"GetProtectionKeyIdActionOperation",
"(",
"\"GetProtectionKeyId\"",
")",
".",
"addQueryParameter",
"(",
"\"contentK... | Gets the protection key id.
@param contentKeyType
the content key type
@return the protection key id | [
"Gets",
"the",
"protection",
"key",
"id",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java#L50-L56 |
35,685 | Azure/azure-sdk-for-java | mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java | ProtectionKey.getProtectionKey | public static EntityTypeActionOperation<String> getProtectionKey(
String protectionKeyId) {
return new GetProtectionKeyActionOperation("GetProtectionKey")
.addQueryParameter("ProtectionKeyId",
String.format("'%s'", protectionKeyId)).setAcceptType(
... | java | public static EntityTypeActionOperation<String> getProtectionKey(
String protectionKeyId) {
return new GetProtectionKeyActionOperation("GetProtectionKey")
.addQueryParameter("ProtectionKeyId",
String.format("'%s'", protectionKeyId)).setAcceptType(
... | [
"public",
"static",
"EntityTypeActionOperation",
"<",
"String",
">",
"getProtectionKey",
"(",
"String",
"protectionKeyId",
")",
"{",
"return",
"new",
"GetProtectionKeyActionOperation",
"(",
"\"GetProtectionKey\"",
")",
".",
"addQueryParameter",
"(",
"\"ProtectionKeyId\"",
... | Gets the protection key.
@param protectionKeyId
the protection key id
@return the protection key | [
"Gets",
"the",
"protection",
"key",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/data-plane/src/main/java/com/microsoft/windowsazure/services/media/models/ProtectionKey.java#L65-L71 |
35,686 | Azure/azure-sdk-for-java | mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java | ServersInner.beginUpdateAsync | public Observable<ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, ServerUpdateParameters parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() {
@Override
p... | java | public Observable<ServerInner> beginUpdateAsync(String resourceGroupName, String serverName, ServerUpdateParameters parameters) {
return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, parameters).map(new Func1<ServiceResponse<ServerInner>, ServerInner>() {
@Override
p... | [
"public",
"Observable",
"<",
"ServerInner",
">",
"beginUpdateAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"serverName",
",",
"ServerUpdateParameters",
"parameters",
")",
"{",
"return",
"beginUpdateWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"se... | Updates an existing server. The request body can contain one to many of the properties present in the normal server definition.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of ... | [
"Updates",
"an",
"existing",
"server",
".",
"The",
"request",
"body",
"can",
"contain",
"one",
"to",
"many",
"of",
"the",
"properties",
"present",
"in",
"the",
"normal",
"server",
"definition",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java#L393-L400 |
35,687 | Azure/azure-sdk-for-java | mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java | ServersInner.listByResourceGroupAsync | public Observable<Page<ServerInner>> listByResourceGroupAsync(String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<ServerInner>>, Page<ServerInner>>() {
@Override
public Page<ServerInner> call(ServiceResponse... | java | public Observable<Page<ServerInner>> listByResourceGroupAsync(String resourceGroupName) {
return listByResourceGroupWithServiceResponseAsync(resourceGroupName).map(new Func1<ServiceResponse<List<ServerInner>>, Page<ServerInner>>() {
@Override
public Page<ServerInner> call(ServiceResponse... | [
"public",
"Observable",
"<",
"Page",
"<",
"ServerInner",
">",
">",
"listByResourceGroupAsync",
"(",
"String",
"resourceGroupName",
")",
"{",
"return",
"listByResourceGroupWithServiceResponseAsync",
"(",
"resourceGroupName",
")",
".",
"map",
"(",
"new",
"Func1",
"<",
... | List all the servers in a given resource group.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@return the observable to the List<ServerInner> object | [
"List",
"all",
"the",
"servers",
"in",
"a",
"given",
"resource",
"group",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mysql/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServersInner.java#L726-L735 |
35,688 | Azure/azure-sdk-for-java | compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java | SnapshotsInner.delete | public void delete(String resourceGroupName, String snapshotName) {
deleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().last().body();
} | java | public void delete(String resourceGroupName, String snapshotName) {
deleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().last().body();
} | [
"public",
"void",
"delete",
"(",
"String",
"resourceGroupName",
",",
"String",
"snapshotName",
")",
"{",
"deleteWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"snapshotName",
")",
".",
"toBlocking",
"(",
")",
".",
"last",
"(",
")",
".",
"body",
"(",
... | Deletes a snapshot.
@param resourceGroupName The name of the resource group.
@param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
@throws IllegalArgum... | [
"Deletes",
"a",
"snapshot",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java#L572-L574 |
35,689 | Azure/azure-sdk-for-java | compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java | SnapshotsInner.beginGrantAccessAsync | public ServiceFuture<AccessUriInner> beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback<AccessUriInner> serviceCallback) {
return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAcc... | java | public ServiceFuture<AccessUriInner> beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessData grantAccessData, final ServiceCallback<AccessUriInner> serviceCallback) {
return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAcc... | [
"public",
"ServiceFuture",
"<",
"AccessUriInner",
">",
"beginGrantAccessAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"snapshotName",
",",
"GrantAccessData",
"grantAccessData",
",",
"final",
"ServiceCallback",
"<",
"AccessUriInner",
">",
"serviceCallback",
")... | Grants access to a snapshot.
@param resourceGroupName The name of the resource group.
@param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
@param gran... | [
"Grants",
"access",
"to",
"a",
"snapshot",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/SnapshotsInner.java#L1042-L1044 |
35,690 | Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java | UsersInner.getAsync | public Observable<UserInner> getAsync(String deviceName, String name, String resourceGroupName) {
return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<UserInner>, UserInner>() {
@Override
public UserInner call(ServiceResponse<UserInner> re... | java | public Observable<UserInner> getAsync(String deviceName, String name, String resourceGroupName) {
return getWithServiceResponseAsync(deviceName, name, resourceGroupName).map(new Func1<ServiceResponse<UserInner>, UserInner>() {
@Override
public UserInner call(ServiceResponse<UserInner> re... | [
"public",
"Observable",
"<",
"UserInner",
">",
"getAsync",
"(",
"String",
"deviceName",
",",
"String",
"name",
",",
"String",
"resourceGroupName",
")",
"{",
"return",
"getWithServiceResponseAsync",
"(",
"deviceName",
",",
"name",
",",
"resourceGroupName",
")",
"."... | Gets the properties of the specified user.
@param deviceName The device name.
@param name The user name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the UserInner object | [
"Gets",
"the",
"properties",
"of",
"the",
"specified",
"user",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/UsersInner.java#L255-L262 |
35,691 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java | TransactionContext.commit | public void commit() throws ServiceBusException, InterruptedException {
if (this.messagingFactory == null) {
throw new ServiceBusException(false, "MessagingFactory should not be null");
}
this.messagingFactory.endTransaction(this, true);
} | java | public void commit() throws ServiceBusException, InterruptedException {
if (this.messagingFactory == null) {
throw new ServiceBusException(false, "MessagingFactory should not be null");
}
this.messagingFactory.endTransaction(this, true);
} | [
"public",
"void",
"commit",
"(",
")",
"throws",
"ServiceBusException",
",",
"InterruptedException",
"{",
"if",
"(",
"this",
".",
"messagingFactory",
"==",
"null",
")",
"{",
"throw",
"new",
"ServiceBusException",
"(",
"false",
",",
"\"MessagingFactory should not be n... | Commits the transaction
@throws ServiceBusException if Commit failed
@throws InterruptedException if the current thread was interrupted while waiting | [
"Commits",
"the",
"transaction"
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java#L44-L50 |
35,692 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java | TransactionContext.commitAsync | public CompletableFuture<Void> commitAsync() {
if (this.messagingFactory == null) {
CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>();
exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null"));
retur... | java | public CompletableFuture<Void> commitAsync() {
if (this.messagingFactory == null) {
CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>();
exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null"));
retur... | [
"public",
"CompletableFuture",
"<",
"Void",
">",
"commitAsync",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messagingFactory",
"==",
"null",
")",
"{",
"CompletableFuture",
"<",
"Void",
">",
"exceptionCompletion",
"=",
"new",
"CompletableFuture",
"<>",
"(",
")",
... | Asynchronously commits the transaction
@return a CompletableFuture for the commit operation | [
"Asynchronously",
"commits",
"the",
"transaction"
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java#L56-L64 |
35,693 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java | TransactionContext.rollback | public void rollback() throws ServiceBusException, InterruptedException {
if (this.messagingFactory == null) {
throw new ServiceBusException(false, "MessagingFactory should not be null");
}
this.messagingFactory.endTransaction(this, false);
} | java | public void rollback() throws ServiceBusException, InterruptedException {
if (this.messagingFactory == null) {
throw new ServiceBusException(false, "MessagingFactory should not be null");
}
this.messagingFactory.endTransaction(this, false);
} | [
"public",
"void",
"rollback",
"(",
")",
"throws",
"ServiceBusException",
",",
"InterruptedException",
"{",
"if",
"(",
"this",
".",
"messagingFactory",
"==",
"null",
")",
"{",
"throw",
"new",
"ServiceBusException",
"(",
"false",
",",
"\"MessagingFactory should not be... | Rollback the transaction
@throws ServiceBusException if rollback failed
@throws InterruptedException if the current thread was interrupted while waiting | [
"Rollback",
"the",
"transaction"
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java#L71-L77 |
35,694 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java | TransactionContext.rollbackAsync | public CompletableFuture<Void> rollbackAsync() {
if (this.messagingFactory == null) {
CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>();
exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null"));
ret... | java | public CompletableFuture<Void> rollbackAsync() {
if (this.messagingFactory == null) {
CompletableFuture<Void> exceptionCompletion = new CompletableFuture<>();
exceptionCompletion.completeExceptionally(new ServiceBusException(false, "MessagingFactory should not be null"));
ret... | [
"public",
"CompletableFuture",
"<",
"Void",
">",
"rollbackAsync",
"(",
")",
"{",
"if",
"(",
"this",
".",
"messagingFactory",
"==",
"null",
")",
"{",
"CompletableFuture",
"<",
"Void",
">",
"exceptionCompletion",
"=",
"new",
"CompletableFuture",
"<>",
"(",
")",
... | Asynchronously rollback the transaction.
@return a CompletableFuture for the rollback operation | [
"Asynchronously",
"rollback",
"the",
"transaction",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java#L83-L91 |
35,695 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createMessageSenderFromEntityPath | public static IMessageSender createMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createMessageSenderFromEntityPathAsync(messagingFactory, entityPath));
} | java | public static IMessageSender createMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createMessageSenderFromEntityPathAsync(messagingFactory, entityPath));
} | [
"public",
"static",
"IMessageSender",
"createMessageSenderFromEntityPath",
"(",
"MessagingFactory",
"messagingFactory",
",",
"String",
"entityPath",
")",
"throws",
"InterruptedException",
",",
"ServiceBusException",
"{",
"return",
"Utils",
".",
"completeFuture",
"(",
"creat... | Creates a message sender to the entity.
@param messagingFactory messaging factory (which represents a connection) on which sender needs to be created
@param entityPath path of entity
@return IMessageSender instance
@throws InterruptedException if the current thread was interrupted while waiting
@throws ServiceBusExcept... | [
"Creates",
"a",
"message",
"sender",
"to",
"the",
"entity",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L94-L96 |
35,696 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createTransferMessageSenderFromEntityPath | public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException
{
return Utils.completeFuture(createTransferMessageSenderFromEntityPathAsync(messagingFactory, entityPath, viaE... | java | public static IMessageSender createTransferMessageSenderFromEntityPath(MessagingFactory messagingFactory, String entityPath, String viaEntityPath) throws InterruptedException, ServiceBusException
{
return Utils.completeFuture(createTransferMessageSenderFromEntityPathAsync(messagingFactory, entityPath, viaE... | [
"public",
"static",
"IMessageSender",
"createTransferMessageSenderFromEntityPath",
"(",
"MessagingFactory",
"messagingFactory",
",",
"String",
"entityPath",
",",
"String",
"viaEntityPath",
")",
"throws",
"InterruptedException",
",",
"ServiceBusException",
"{",
"return",
"Util... | Creates a transfer message sender. This sender sends message to destination entity via another entity.
This is mainly to be used when sending messages in a transaction.
When messages need to be sent across entities in a single transaction, this can be used to ensure
all the messages land initially in the same entity/p... | [
"Creates",
"a",
"transfer",
"message",
"sender",
".",
"This",
"sender",
"sends",
"message",
"to",
"destination",
"entity",
"via",
"another",
"entity",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L116-L119 |
35,697 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createMessageSenderFromConnectionStringBuilderAsync | public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder) {
Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder);
return createMessageSenderFromEntityPathAsync(amqpConnectionStringBu... | java | public static CompletableFuture<IMessageSender> createMessageSenderFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder) {
Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder);
return createMessageSenderFromEntityPathAsync(amqpConnectionStringBu... | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSender",
">",
"createMessageSenderFromConnectionStringBuilderAsync",
"(",
"ConnectionStringBuilder",
"amqpConnectionStringBuilder",
")",
"{",
"Utils",
".",
"assertNonNull",
"(",
"\"amqpConnectionStringBuilder\"",
",",
"amqpCo... | Create message sender asynchronously from ConnectionStringBuilder
@param amqpConnectionStringBuilder the connection string builder
@return a CompletableFuture representing the pending creating of {@link IMessageSender} instance | [
"Create",
"message",
"sender",
"asynchronously",
"from",
"ConnectionStringBuilder"
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L138-L141 |
35,698 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createTransferMessageSenderFromEntityPathAsync | public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)
{
Utils.assertNonNull("messagingFactory", messagingFactory);
MessageSender sender = new MessageSender(messagingFactory, viaEntity... | java | public static CompletableFuture<IMessageSender> createTransferMessageSenderFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String viaEntityPath)
{
Utils.assertNonNull("messagingFactory", messagingFactory);
MessageSender sender = new MessageSender(messagingFactory, viaEntity... | [
"public",
"static",
"CompletableFuture",
"<",
"IMessageSender",
">",
"createTransferMessageSenderFromEntityPathAsync",
"(",
"MessagingFactory",
"messagingFactory",
",",
"String",
"entityPath",
",",
"String",
"viaEntityPath",
")",
"{",
"Utils",
".",
"assertNonNull",
"(",
"... | Creates a transfer message sender asynchronously. This sender sends message to destination entity via another entity.
This is mainly to be used when sending messages in a transaction.
When messages need to be sent across entities in a single transaction, this can be used to ensure
all the messages land initially in th... | [
"Creates",
"a",
"transfer",
"message",
"sender",
"asynchronously",
".",
"This",
"sender",
"sends",
"message",
"to",
"destination",
"entity",
"via",
"another",
"entity",
"."
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L209-L214 |
35,699 | Azure/azure-sdk-for-java | servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java | ClientFactory.createMessageReceiverFromEntityPath | public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings)... | java | public static IMessageReceiver createMessageReceiverFromEntityPath(URI namespaceEndpointURI, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException {
return Utils.completeFuture(createMessageReceiverFromEntityPathAsync(namespaceEndpointURI, entityPath, clientSettings)... | [
"public",
"static",
"IMessageReceiver",
"createMessageReceiverFromEntityPath",
"(",
"URI",
"namespaceEndpointURI",
",",
"String",
"entityPath",
",",
"ClientSettings",
"clientSettings",
")",
"throws",
"InterruptedException",
",",
"ServiceBusException",
"{",
"return",
"Utils",
... | Creates a message receiver to the entity using the client settings in PeekLock mode
@param namespaceEndpointURI endpoint uri of entity namespace
@param entityPath path of the entity
@param clientSettings client settings
@return IMessageReceiver instance
@throws InterruptedException if the current thread was interrupted... | [
"Creates",
"a",
"message",
"receiver",
"to",
"the",
"entity",
"using",
"the",
"client",
"settings",
"in",
"PeekLock",
"mode"
] | aab183ddc6686c82ec10386d5a683d2691039626 | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L308-L310 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.