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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,200 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getBitString | public byte[] getBitString(int len) throws IOException {
if (len > available())
throw new IOException("short read of bit string");
if (len == 0) {
throw new IOException("Invalid encoding: zero length bit string");
}
int numOfPadBits = buf[pos];
if ((numO... | java | public byte[] getBitString(int len) throws IOException {
if (len > available())
throw new IOException("short read of bit string");
if (len == 0) {
throw new IOException("Invalid encoding: zero length bit string");
}
int numOfPadBits = buf[pos];
if ((numO... | [
"public",
"byte",
"[",
"]",
"getBitString",
"(",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len",
">",
"available",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"\"short read of bit string\"",
")",
";",
"if",
"(",
"len",
"==",
"0"... | Returns the bit string which takes up the specified
number of bytes in this buffer. | [
"Returns",
"the",
"bit",
"string",
"which",
"takes",
"up",
"the",
"specified",
"number",
"of",
"bytes",
"in",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L199-L220 |
34,201 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getUnalignedBitString | BitArray getUnalignedBitString() throws IOException {
if (pos >= count)
return null;
/*
* Just copy the data into an aligned, padded octet buffer,
* and consume the rest of the buffer.
*/
int len = available();
int unusedBits = buf[pos] & 0xff;
... | java | BitArray getUnalignedBitString() throws IOException {
if (pos >= count)
return null;
/*
* Just copy the data into an aligned, padded octet buffer,
* and consume the rest of the buffer.
*/
int len = available();
int unusedBits = buf[pos] & 0xff;
... | [
"BitArray",
"getUnalignedBitString",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"pos",
">=",
"count",
")",
"return",
"null",
";",
"/*\n * Just copy the data into an aligned, padded octet buffer,\n * and consume the rest of the buffer.\n */",
"int",
... | Returns the bit string which takes up the rest of this buffer.
The bit string need not be byte-aligned. | [
"Returns",
"the",
"bit",
"string",
"which",
"takes",
"up",
"the",
"rest",
"of",
"this",
"buffer",
".",
"The",
"bit",
"string",
"need",
"not",
"be",
"byte",
"-",
"aligned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L233-L254 |
34,202 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getUTCTime | public Date getUTCTime(int len) throws IOException {
if (len > available())
throw new IOException("short read of DER UTC Time");
if (len < 11 || len > 17)
throw new IOException("DER UTC Time length error");
return getTime(len, false);
} | java | public Date getUTCTime(int len) throws IOException {
if (len > available())
throw new IOException("short read of DER UTC Time");
if (len < 11 || len > 17)
throw new IOException("DER UTC Time length error");
return getTime(len, false);
} | [
"public",
"Date",
"getUTCTime",
"(",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len",
">",
"available",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"\"short read of DER UTC Time\"",
")",
";",
"if",
"(",
"len",
"<",
"11",
"||",
"l... | Returns the UTC Time value that takes up the specified number
of bytes in this buffer.
@param len the number of bytes to use | [
"Returns",
"the",
"UTC",
"Time",
"value",
"that",
"takes",
"up",
"the",
"specified",
"number",
"of",
"bytes",
"in",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L261-L269 |
34,203 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getGeneralizedTime | public Date getGeneralizedTime(int len) throws IOException {
if (len > available())
throw new IOException("short read of DER Generalized Time");
if (len < 13 || len > 23)
throw new IOException("DER Generalized Time length error");
return getTime(len, true);
} | java | public Date getGeneralizedTime(int len) throws IOException {
if (len > available())
throw new IOException("short read of DER Generalized Time");
if (len < 13 || len > 23)
throw new IOException("DER Generalized Time length error");
return getTime(len, true);
} | [
"public",
"Date",
"getGeneralizedTime",
"(",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len",
">",
"available",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"\"short read of DER Generalized Time\"",
")",
";",
"if",
"(",
"len",
"<",
"1... | Returns the Generalized Time value that takes up the specified
number of bytes in this buffer.
@param len the number of bytes to use | [
"Returns",
"the",
"Generalized",
"Time",
"value",
"that",
"takes",
"up",
"the",
"specified",
"number",
"of",
"bytes",
"in",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L276-L285 |
34,204 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java | SerializationStripper.visit | @Override
public boolean visit(TypeDeclaration node) {
TypeMirror serializableType = typeUtil.resolveJavaType("java.io.Serializable").asType();
TypeMirror nodeType = node.getTypeElement().asType();
boolean isSerializable = typeUtil.isAssignable(nodeType, serializableType);
boolean stripReflection = !t... | java | @Override
public boolean visit(TypeDeclaration node) {
TypeMirror serializableType = typeUtil.resolveJavaType("java.io.Serializable").asType();
TypeMirror nodeType = node.getTypeElement().asType();
boolean isSerializable = typeUtil.isAssignable(nodeType, serializableType);
boolean stripReflection = !t... | [
"@",
"Override",
"public",
"boolean",
"visit",
"(",
"TypeDeclaration",
"node",
")",
"{",
"TypeMirror",
"serializableType",
"=",
"typeUtil",
".",
"resolveJavaType",
"(",
"\"java.io.Serializable\"",
")",
".",
"asType",
"(",
")",
";",
"TypeMirror",
"nodeType",
"=",
... | Only modify Serializable types when stripping reflection metadata. | [
"Only",
"modify",
"Serializable",
"types",
"when",
"stripping",
"reflection",
"metadata",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java#L50-L57 |
34,205 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java | SerializationStripper.visit | @Override
public boolean visit(FieldDeclaration node) {
if (isSerializationField(node.getFragment(0).getVariableElement())) {
node.remove();
}
return false;
} | java | @Override
public boolean visit(FieldDeclaration node) {
if (isSerializationField(node.getFragment(0).getVariableElement())) {
node.remove();
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"visit",
"(",
"FieldDeclaration",
"node",
")",
"{",
"if",
"(",
"isSerializationField",
"(",
"node",
".",
"getFragment",
"(",
"0",
")",
".",
"getVariableElement",
"(",
")",
")",
")",
"{",
"node",
".",
"remove",
"(",
"... | Removes serialVersionUID field. | [
"Removes",
"serialVersionUID",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java#L60-L66 |
34,206 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java | SerializationStripper.visit | @Override
public boolean visit(MethodDeclaration node) {
if (isSerializationMethod(node.getExecutableElement())) {
node.remove();
}
return false;
} | java | @Override
public boolean visit(MethodDeclaration node) {
if (isSerializationMethod(node.getExecutableElement())) {
node.remove();
}
return false;
} | [
"@",
"Override",
"public",
"boolean",
"visit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"if",
"(",
"isSerializationMethod",
"(",
"node",
".",
"getExecutableElement",
"(",
")",
")",
")",
"{",
"node",
".",
"remove",
"(",
")",
";",
"}",
"return",
"false",
... | Removes serialization related methods. | [
"Removes",
"serialization",
"related",
"methods",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/SerializationStripper.java#L69-L75 |
34,207 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetRecog_Unicode.java | CharsetRecog_Unicode.adjustConfidence | static int adjustConfidence(int codeUnit, int confidence) {
if (codeUnit == 0) {
confidence -= 10;
} else if ((codeUnit >= 0x20 && codeUnit <= 0xff) || codeUnit == 0x0a) {
confidence += 10;
}
if (confidence < 0) {
confidence = 0;
} else if (con... | java | static int adjustConfidence(int codeUnit, int confidence) {
if (codeUnit == 0) {
confidence -= 10;
} else if ((codeUnit >= 0x20 && codeUnit <= 0xff) || codeUnit == 0x0a) {
confidence += 10;
}
if (confidence < 0) {
confidence = 0;
} else if (con... | [
"static",
"int",
"adjustConfidence",
"(",
"int",
"codeUnit",
",",
"int",
"confidence",
")",
"{",
"if",
"(",
"codeUnit",
"==",
"0",
")",
"{",
"confidence",
"-=",
"10",
";",
"}",
"else",
"if",
"(",
"(",
"codeUnit",
">=",
"0x20",
"&&",
"codeUnit",
"<=",
... | NULs should be rare in actual text. | [
"NULs",
"should",
"be",
"rare",
"in",
"actual",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetRecog_Unicode.java#L41-L53 |
34,208 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java | ScientificNumberFormatter.getMarkupInstance | public static ScientificNumberFormatter getMarkupInstance(
ULocale locale,
String beginMarkup,
String endMarkup) {
return getInstanceForLocale(
locale, new MarkupStyle(beginMarkup, endMarkup));
} | java | public static ScientificNumberFormatter getMarkupInstance(
ULocale locale,
String beginMarkup,
String endMarkup) {
return getInstanceForLocale(
locale, new MarkupStyle(beginMarkup, endMarkup));
} | [
"public",
"static",
"ScientificNumberFormatter",
"getMarkupInstance",
"(",
"ULocale",
"locale",
",",
"String",
"beginMarkup",
",",
"String",
"endMarkup",
")",
"{",
"return",
"getInstanceForLocale",
"(",
"locale",
",",
"new",
"MarkupStyle",
"(",
"beginMarkup",
",",
"... | Gets a ScientificNumberFormatter instance that uses
markup for exponents for this locale.
@param locale The locale
@param beginMarkup the markup to start superscript e.g {@code <sup>}
@param endMarkup the markup to end superscript e.g {@code </sup>}
@return The ScientificNumberFormatter instance. | [
"Gets",
"a",
"ScientificNumberFormatter",
"instance",
"that",
"uses",
"markup",
"for",
"exponents",
"for",
"this",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java#L74-L80 |
34,209 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java | ScientificNumberFormatter.getMarkupInstance | public static ScientificNumberFormatter getMarkupInstance(
DecimalFormat df,
String beginMarkup,
String endMarkup) {
return getInstance(
df, new MarkupStyle(beginMarkup, endMarkup));
} | java | public static ScientificNumberFormatter getMarkupInstance(
DecimalFormat df,
String beginMarkup,
String endMarkup) {
return getInstance(
df, new MarkupStyle(beginMarkup, endMarkup));
} | [
"public",
"static",
"ScientificNumberFormatter",
"getMarkupInstance",
"(",
"DecimalFormat",
"df",
",",
"String",
"beginMarkup",
",",
"String",
"endMarkup",
")",
"{",
"return",
"getInstance",
"(",
"df",
",",
"new",
"MarkupStyle",
"(",
"beginMarkup",
",",
"endMarkup",... | Gets a ScientificNumberFormatter instance that uses
markup for exponents.
@param df The DecimalFormat must be configured for scientific
notation. Caller may safely change df after this call as this method
clones it when creating the ScientificNumberFormatter.
@param beginMarkup the markup to start superscript e.g {@cod... | [
"Gets",
"a",
"ScientificNumberFormatter",
"instance",
"that",
"uses",
"markup",
"for",
"exponents",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java#L92-L98 |
34,210 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java | ScientificNumberFormatter.format | public String format(Object number) {
synchronized (fmt) {
return style.format(
fmt.formatToCharacterIterator(number),
preExponent);
}
} | java | public String format(Object number) {
synchronized (fmt) {
return style.format(
fmt.formatToCharacterIterator(number),
preExponent);
}
} | [
"public",
"String",
"format",
"(",
"Object",
"number",
")",
"{",
"synchronized",
"(",
"fmt",
")",
"{",
"return",
"style",
".",
"format",
"(",
"fmt",
".",
"formatToCharacterIterator",
"(",
"number",
")",
",",
"preExponent",
")",
";",
"}",
"}"
] | Formats a number
@param number Can be a double, int, Number or
anything that DecimalFormat#format(Object) accepts.
@return the formatted string. | [
"Formats",
"a",
"number"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ScientificNumberFormatter.java#L106-L112 |
34,211 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java | URLConnection.getHeaderFieldKey | public String getHeaderFieldKey(int n) {
try {
getInputStream();
} catch (Exception e) {
return null;
}
MessageHeader props = properties;
return props == null ? null : props.getKey(n);
} | java | public String getHeaderFieldKey(int n) {
try {
getInputStream();
} catch (Exception e) {
return null;
}
MessageHeader props = properties;
return props == null ? null : props.getKey(n);
} | [
"public",
"String",
"getHeaderFieldKey",
"(",
"int",
"n",
")",
"{",
"try",
"{",
"getInputStream",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
"null",
";",
"}",
"MessageHeader",
"props",
"=",
"properties",
";",
"return",
"props... | Return the key for the nth header field. Returns null if
there are fewer than n fields. This can be used to iterate
through all the headers in the message. | [
"Return",
"the",
"key",
"for",
"the",
"nth",
"header",
"field",
".",
"Returns",
"null",
"if",
"there",
"are",
"fewer",
"than",
"n",
"fields",
".",
"This",
"can",
"be",
"used",
"to",
"iterate",
"through",
"all",
"the",
"headers",
"in",
"the",
"message",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java#L119-L127 |
34,212 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java | URLConnection.getHeaderField | public String getHeaderField(int n) {
try {
getInputStream();
} catch (Exception e) {
return null;
}
MessageHeader props = properties;
return props == null ? null : props.getValue(n);
} | java | public String getHeaderField(int n) {
try {
getInputStream();
} catch (Exception e) {
return null;
}
MessageHeader props = properties;
return props == null ? null : props.getValue(n);
} | [
"public",
"String",
"getHeaderField",
"(",
"int",
"n",
")",
"{",
"try",
"{",
"getInputStream",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
"null",
";",
"}",
"MessageHeader",
"props",
"=",
"properties",
";",
"return",
"props",
... | Return the value for the nth header field. Returns null if
there are fewer than n fields. This can be used in conjunction
with getHeaderFieldKey to iterate through all the headers in the message. | [
"Return",
"the",
"value",
"for",
"the",
"nth",
"header",
"field",
".",
"Returns",
"null",
"if",
"there",
"are",
"fewer",
"than",
"n",
"fields",
".",
"This",
"can",
"be",
"used",
"in",
"conjunction",
"with",
"getHeaderFieldKey",
"to",
"iterate",
"through",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java#L134-L142 |
34,213 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java | URLConnection.getContentType | public String getContentType() {
if (contentType == null)
contentType = getHeaderField("content-type");
if (contentType == null) {
String ct = null;
try {
ct = guessContentTypeFromStream(getInputStream());
} catch(java.io.IOException e) {
... | java | public String getContentType() {
if (contentType == null)
contentType = getHeaderField("content-type");
if (contentType == null) {
String ct = null;
try {
ct = guessContentTypeFromStream(getInputStream());
} catch(java.io.IOException e) {
... | [
"public",
"String",
"getContentType",
"(",
")",
"{",
"if",
"(",
"contentType",
"==",
"null",
")",
"contentType",
"=",
"getHeaderField",
"(",
"\"content-type\"",
")",
";",
"if",
"(",
"contentType",
"==",
"null",
")",
"{",
"String",
"ct",
"=",
"null",
";",
... | Call this routine to get the content-type associated with this
object. | [
"Call",
"this",
"routine",
"to",
"get",
"the",
"content",
"-",
"type",
"associated",
"with",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java#L147-L184 |
34,214 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java | URLConnection.getContentLength | public int getContentLength() {
try {
getInputStream();
} catch (Exception e) {
return -1;
}
int l = contentLength;
if (l < 0) {
try {
l = Integer.parseInt(properties.findValue("content-length"));
setContentLengt... | java | public int getContentLength() {
try {
getInputStream();
} catch (Exception e) {
return -1;
}
int l = contentLength;
if (l < 0) {
try {
l = Integer.parseInt(properties.findValue("content-length"));
setContentLengt... | [
"public",
"int",
"getContentLength",
"(",
")",
"{",
"try",
"{",
"getInputStream",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"l",
"=",
"contentLength",
";",
"if",
"(",
"l",
"<",
"0",
")",
"{... | Call this routine to get the content-length associated with this
object. | [
"Call",
"this",
"routine",
"to",
"get",
"the",
"content",
"-",
"length",
"associated",
"with",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/URLConnection.java#L201-L216 |
34,215 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java | IosHttpURLConnection.getHeaderField | @Override
public String getHeaderField(String key) {
try {
getResponse();
return getHeaderFieldDoNotForceResponse(key);
} catch(IOException e) {
return null;
}
} | java | @Override
public String getHeaderField(String key) {
try {
getResponse();
return getHeaderFieldDoNotForceResponse(key);
} catch(IOException e) {
return null;
}
} | [
"@",
"Override",
"public",
"String",
"getHeaderField",
"(",
"String",
"key",
")",
"{",
"try",
"{",
"getResponse",
"(",
")",
";",
"return",
"getHeaderFieldDoNotForceResponse",
"(",
"key",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"return",
... | Returns the value of the named header field.
If called on a connection that sets the same header multiple times with
possibly different values, only the last value is returned. | [
"Returns",
"the",
"value",
"of",
"the",
"named",
"header",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java#L282-L290 |
34,216 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java | IosHttpURLConnection.loadRequestCookies | private void loadRequestCookies() throws IOException {
CookieHandler cookieHandler = CookieHandler.getDefault();
if (cookieHandler != null) {
try {
URI uri = getURL().toURI();
Map<String, List<String>> cookieHeaders =
cookieHandler.get(uri, getHeaderFieldsDoNotForceResponse());... | java | private void loadRequestCookies() throws IOException {
CookieHandler cookieHandler = CookieHandler.getDefault();
if (cookieHandler != null) {
try {
URI uri = getURL().toURI();
Map<String, List<String>> cookieHeaders =
cookieHandler.get(uri, getHeaderFieldsDoNotForceResponse());... | [
"private",
"void",
"loadRequestCookies",
"(",
")",
"throws",
"IOException",
"{",
"CookieHandler",
"cookieHandler",
"=",
"CookieHandler",
".",
"getDefault",
"(",
")",
";",
"if",
"(",
"cookieHandler",
"!=",
"null",
")",
"{",
"try",
"{",
"URI",
"uri",
"=",
"get... | Add any cookies for this URI to the request headers. | [
"Add",
"any",
"cookies",
"for",
"this",
"URI",
"to",
"the",
"request",
"headers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java#L486-L513 |
34,217 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java | IosHttpURLConnection.saveResponseCookies | private void saveResponseCookies() throws IOException {
CookieHandler cookieHandler = CookieHandler.getDefault();
if (cookieHandler != null) {
try {
URI uri = getURL().toURI();
cookieHandler.put(uri, getHeaderFieldsDoNotForceResponse());
} catch (URISyntaxException e) {
throw... | java | private void saveResponseCookies() throws IOException {
CookieHandler cookieHandler = CookieHandler.getDefault();
if (cookieHandler != null) {
try {
URI uri = getURL().toURI();
cookieHandler.put(uri, getHeaderFieldsDoNotForceResponse());
} catch (URISyntaxException e) {
throw... | [
"private",
"void",
"saveResponseCookies",
"(",
")",
"throws",
"IOException",
"{",
"CookieHandler",
"cookieHandler",
"=",
"CookieHandler",
".",
"getDefault",
"(",
")",
";",
"if",
"(",
"cookieHandler",
"!=",
"null",
")",
"{",
"try",
"{",
"URI",
"uri",
"=",
"ge... | Store any returned cookies. | [
"Store",
"any",
"returned",
"cookies",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java#L518-L528 |
34,218 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java | IosHttpURLConnection.secureConnectionException | static IOException secureConnectionException(String description) {
try {
Class<?> sslExceptionClass = Class.forName("javax.net.ssl.SSLException");
Constructor<?> constructor = sslExceptionClass.getConstructor(String.class);
return (IOException) constructor.newInstance(description);
} catch (Cl... | java | static IOException secureConnectionException(String description) {
try {
Class<?> sslExceptionClass = Class.forName("javax.net.ssl.SSLException");
Constructor<?> constructor = sslExceptionClass.getConstructor(String.class);
return (IOException) constructor.newInstance(description);
} catch (Cl... | [
"static",
"IOException",
"secureConnectionException",
"(",
"String",
"description",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"sslExceptionClass",
"=",
"Class",
".",
"forName",
"(",
"\"javax.net.ssl.SSLException\"",
")",
";",
"Constructor",
"<",
"?",
">",
"c... | Returns an SSLException if that class is linked into the application,
otherwise IOException. | [
"Returns",
"an",
"SSLException",
"if",
"that",
"class",
"is",
"linked",
"into",
"the",
"application",
"otherwise",
"IOException",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/IosHttpURLConnection.java#L759-L769 |
34,219 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java | ElemTemplateElement.getSystemId | public String getSystemId()
{
Stylesheet sheet=getStylesheet();
return (sheet==null) ? null : sheet.getHref();
} | java | public String getSystemId()
{
Stylesheet sheet=getStylesheet();
return (sheet==null) ? null : sheet.getHref();
} | [
"public",
"String",
"getSystemId",
"(",
")",
"{",
"Stylesheet",
"sheet",
"=",
"getStylesheet",
"(",
")",
";",
"return",
"(",
"sheet",
"==",
"null",
")",
"?",
"null",
":",
"sheet",
".",
"getHref",
"(",
")",
";",
"}"
] | Return the system identifier for the current document event.
<p>If the system identifier is a URL, the parser must resolve it
fully before passing it to the application.</p>
@return A string containing the system identifier, or null
if none is available.
@see #getPublicId | [
"Return",
"the",
"system",
"identifier",
"for",
"the",
"current",
"document",
"event",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L725-L729 |
34,220 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java | ElemTemplateElement.setPrefixes | public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
throws TransformerException
{
Enumeration decls = nsSupport.getDeclaredPrefixes();
while (decls.hasMoreElements())
{
String prefix = (String) decls.nextElement();
if (null == m_declaredPrefixes)
m_... | java | public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
throws TransformerException
{
Enumeration decls = nsSupport.getDeclaredPrefixes();
while (decls.hasMoreElements())
{
String prefix = (String) decls.nextElement();
if (null == m_declaredPrefixes)
m_... | [
"public",
"void",
"setPrefixes",
"(",
"NamespaceSupport",
"nsSupport",
",",
"boolean",
"excludeXSLDecl",
")",
"throws",
"TransformerException",
"{",
"Enumeration",
"decls",
"=",
"nsSupport",
".",
"getDeclaredPrefixes",
"(",
")",
";",
"while",
"(",
"decls",
".",
"h... | Copy the namespace declarations from the NamespaceSupport object.
Take care to call resolveInheritedNamespaceDecls.
after all namespace declarations have been added.
@param nsSupport non-null reference to NamespaceSupport from
the ContentHandler.
@param excludeXSLDecl true if XSLT namespaces should be ignored.
@throw... | [
"Copy",
"the",
"namespace",
"declarations",
"from",
"the",
"NamespaceSupport",
"object",
".",
"Take",
"care",
"to",
"call",
"resolveInheritedNamespaceDecls",
".",
"after",
"all",
"namespace",
"declarations",
"have",
"been",
"added",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L852-L875 |
34,221 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java | ElemTemplateElement.getNamespaceForPrefix | public String getNamespaceForPrefix(String prefix, org.w3c.dom.Node context)
{
this.error(XSLTErrorResources.ER_CANT_RESOLVE_NSPREFIX, null);
return null;
} | java | public String getNamespaceForPrefix(String prefix, org.w3c.dom.Node context)
{
this.error(XSLTErrorResources.ER_CANT_RESOLVE_NSPREFIX, null);
return null;
} | [
"public",
"String",
"getNamespaceForPrefix",
"(",
"String",
"prefix",
",",
"org",
".",
"w3c",
".",
"dom",
".",
"Node",
"context",
")",
"{",
"this",
".",
"error",
"(",
"XSLTErrorResources",
".",
"ER_CANT_RESOLVE_NSPREFIX",
",",
"null",
")",
";",
"return",
"nu... | Fullfill the PrefixResolver interface. Calling this for this class
will throw an error.
@param prefix The prefix to look up, which may be an empty string ("")
for the default Namespace.
@param context The node context from which to look up the URI.
@return null if the error listener does not choose to throw an excep... | [
"Fullfill",
"the",
"PrefixResolver",
"interface",
".",
"Calling",
"this",
"for",
"this",
"class",
"will",
"throw",
"an",
"error",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L887-L892 |
34,222 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java | ElemTemplateElement.addOrReplaceDecls | void addOrReplaceDecls(XMLNSDecl newDecl)
{
int n = m_prefixTable.size();
for (int i = n - 1; i >= 0; i--)
{
XMLNSDecl decl = (XMLNSDecl) m_prefixTable.get(i);
if (decl.getPrefix().equals(newDecl.getPrefix()))
{
return;
}
}
m_pr... | java | void addOrReplaceDecls(XMLNSDecl newDecl)
{
int n = m_prefixTable.size();
for (int i = n - 1; i >= 0; i--)
{
XMLNSDecl decl = (XMLNSDecl) m_prefixTable.get(i);
if (decl.getPrefix().equals(newDecl.getPrefix()))
{
return;
}
}
m_pr... | [
"void",
"addOrReplaceDecls",
"(",
"XMLNSDecl",
"newDecl",
")",
"{",
"int",
"n",
"=",
"m_prefixTable",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"n",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"XMLNSDecl",
"decl",
"=",... | Add or replace this namespace declaration in list
of namespaces in scope for this element.
@param newDecl namespace declaration to add to list | [
"Add",
"or",
"replace",
"this",
"namespace",
"declaration",
"in",
"list",
"of",
"namespaces",
"in",
"scope",
"for",
"this",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L1130-L1145 |
34,223 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java | ElemTemplateElement.unexecuteNSDecls | void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException
{
try
{
if (null != m_prefixTable)
{
SerializationHandler rhandler = transformer.getResultTreeHandler();
int n = m_prefixTable.size();
for (int i = 0; i < n; i++)
... | java | void unexecuteNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException
{
try
{
if (null != m_prefixTable)
{
SerializationHandler rhandler = transformer.getResultTreeHandler();
int n = m_prefixTable.size();
for (int i = 0; i < n; i++)
... | [
"void",
"unexecuteNSDecls",
"(",
"TransformerImpl",
"transformer",
",",
"String",
"ignorePrefix",
")",
"throws",
"TransformerException",
"{",
"try",
"{",
"if",
"(",
"null",
"!=",
"m_prefixTable",
")",
"{",
"SerializationHandler",
"rhandler",
"=",
"transformer",
".",... | Send endPrefixMapping events to the result tree handler
for all declared prefix mappings in the stylesheet.
@param transformer non-null reference to the the current transform-time state.
@param ignorePrefix string prefix to not endPrefixMapping
@throws TransformerException | [
"Send",
"endPrefixMapping",
"events",
"to",
"the",
"result",
"tree",
"handler",
"for",
"all",
"declared",
"prefix",
"mappings",
"in",
"the",
"stylesheet",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java#L1226-L1251 |
34,224 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StringVector.java | StringVector.pop | public final String pop()
{
if (m_firstFree <= 0)
return null;
m_firstFree--;
String s = m_map[m_firstFree];
m_map[m_firstFree] = null;
return s;
} | java | public final String pop()
{
if (m_firstFree <= 0)
return null;
m_firstFree--;
String s = m_map[m_firstFree];
m_map[m_firstFree] = null;
return s;
} | [
"public",
"final",
"String",
"pop",
"(",
")",
"{",
"if",
"(",
"m_firstFree",
"<=",
"0",
")",
"return",
"null",
";",
"m_firstFree",
"--",
";",
"String",
"s",
"=",
"m_map",
"[",
"m_firstFree",
"]",
";",
"m_map",
"[",
"m_firstFree",
"]",
"=",
"null",
";... | Pop the tail of this vector.
@return The String last added to this vector or null not found.
The string is removed from the vector. | [
"Pop",
"the",
"tail",
"of",
"this",
"vector",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/StringVector.java#L199-L212 |
34,225 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java | JavaTimeZone.createTimeZone | public static JavaTimeZone createTimeZone(String id) {
java.util.TimeZone jtz = null;
if (AVAILABLESET.contains(id)) {
jtz = java.util.TimeZone.getTimeZone(id);
}
if (jtz == null) {
// Use ICU's canonical ID mapping
boolean[] isSystemID = new boolean... | java | public static JavaTimeZone createTimeZone(String id) {
java.util.TimeZone jtz = null;
if (AVAILABLESET.contains(id)) {
jtz = java.util.TimeZone.getTimeZone(id);
}
if (jtz == null) {
// Use ICU's canonical ID mapping
boolean[] isSystemID = new boolean... | [
"public",
"static",
"JavaTimeZone",
"createTimeZone",
"(",
"String",
"id",
")",
"{",
"java",
".",
"util",
".",
"TimeZone",
"jtz",
"=",
"null",
";",
"if",
"(",
"AVAILABLESET",
".",
"contains",
"(",
"id",
")",
")",
"{",
"jtz",
"=",
"java",
".",
"util",
... | Creates an instance of JavaTimeZone with the given timezone ID.
@param id A timezone ID, either a system ID or a custom ID.
@return An instance of JavaTimeZone for the given ID, or null
when the ID cannot be understood. | [
"Creates",
"an",
"instance",
"of",
"JavaTimeZone",
"with",
"the",
"given",
"timezone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/JavaTimeZone.java#L86-L107 |
34,226 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/gen/SourceBuilder.java | SourceBuilder.reindent | public String reindent(String code) {
try {
// Remove indention from each line.
StringBuilder sb = new StringBuilder();
LineReader lr = new LineReader(new StringReader(code));
String line = lr.readLine();
while (line != null) {
sb.append(line.trim());
line = lr.readLine... | java | public String reindent(String code) {
try {
// Remove indention from each line.
StringBuilder sb = new StringBuilder();
LineReader lr = new LineReader(new StringReader(code));
String line = lr.readLine();
while (line != null) {
sb.append(line.trim());
line = lr.readLine... | [
"public",
"String",
"reindent",
"(",
"String",
"code",
")",
"{",
"try",
"{",
"// Remove indention from each line.",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"LineReader",
"lr",
"=",
"new",
"LineReader",
"(",
"new",
"StringReader",
"(",
... | Fix line indention, based on brace count. | [
"Fix",
"line",
"indention",
"based",
"on",
"brace",
"count",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/gen/SourceBuilder.java#L213-L254 |
34,227 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/ContentInfo.java | ContentInfo.getContentBytes | public byte[] getContentBytes() throws IOException {
if (content == null)
return null;
DerInputStream dis = new DerInputStream(content.toByteArray());
return dis.getOctetString();
} | java | public byte[] getContentBytes() throws IOException {
if (content == null)
return null;
DerInputStream dis = new DerInputStream(content.toByteArray());
return dis.getOctetString();
} | [
"public",
"byte",
"[",
"]",
"getContentBytes",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"content",
"==",
"null",
")",
"return",
"null",
";",
"DerInputStream",
"dis",
"=",
"new",
"DerInputStream",
"(",
"content",
".",
"toByteArray",
"(",
")",
")",... | Returns a byte array representation of the data held in
the content field. | [
"Returns",
"a",
"byte",
"array",
"representation",
"of",
"the",
"data",
"held",
"in",
"the",
"content",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/ContentInfo.java#L203-L209 |
34,228 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.demandLogger | Logger demandLogger(String name, String resourceBundleName, Class<?> caller) {
Logger result = getLogger(name);
if (result == null) {
// only allocate the new logger once
Logger newLogger = new Logger(name, resourceBundleName, caller);
do {
if (addLogg... | java | Logger demandLogger(String name, String resourceBundleName, Class<?> caller) {
Logger result = getLogger(name);
if (result == null) {
// only allocate the new logger once
Logger newLogger = new Logger(name, resourceBundleName, caller);
do {
if (addLogg... | [
"Logger",
"demandLogger",
"(",
"String",
"name",
",",
"String",
"resourceBundleName",
",",
"Class",
"<",
"?",
">",
"caller",
")",
"{",
"Logger",
"result",
"=",
"getLogger",
"(",
"name",
")",
";",
"if",
"(",
"result",
"==",
"null",
")",
"{",
"// only allo... | readConfiguration, and other methods. | [
"readConfiguration",
"and",
"other",
"methods",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L407-L434 |
34,229 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.loadLoggerHandlers | private void loadLoggerHandlers(final Logger logger, final String name,
final String handlersPropertyName)
{
/* J2ObjC removed.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
*/
String names... | java | private void loadLoggerHandlers(final Logger logger, final String name,
final String handlersPropertyName)
{
/* J2ObjC removed.
AccessController.doPrivileged(new PrivilegedAction<Object>() {
public Object run() {
*/
String names... | [
"private",
"void",
"loadLoggerHandlers",
"(",
"final",
"Logger",
"logger",
",",
"final",
"String",
"name",
",",
"final",
"String",
"handlersPropertyName",
")",
"{",
"/* J2ObjC removed.\n AccessController.doPrivileged(new PrivilegedAction<Object>() {\n public Objec... | only be modified by trusted code. | [
"only",
"be",
"modified",
"by",
"trusted",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L811-L849 |
34,230 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.resetLogger | private void resetLogger(Logger logger) {
// Close all the Logger's handlers.
Handler[] targets = logger.getHandlers();
for (int i = 0; i < targets.length; i++) {
Handler h = targets[i];
logger.removeHandler(h);
try {
h.close();
} c... | java | private void resetLogger(Logger logger) {
// Close all the Logger's handlers.
Handler[] targets = logger.getHandlers();
for (int i = 0; i < targets.length; i++) {
Handler h = targets[i];
logger.removeHandler(h);
try {
h.close();
} c... | [
"private",
"void",
"resetLogger",
"(",
"Logger",
"logger",
")",
"{",
"// Close all the Logger's handlers.",
"Handler",
"[",
"]",
"targets",
"=",
"logger",
".",
"getHandlers",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"targets",
".",
... | Private method to reset an individual target logger. | [
"Private",
"method",
"to",
"reset",
"an",
"individual",
"target",
"logger",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1190-L1209 |
34,231 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.parseClassNames | private String[] parseClassNames(String propertyName) {
String hands = getProperty(propertyName);
if (hands == null) {
return new String[0];
}
hands = hands.trim();
int ix = 0;
Vector<String> result = new Vector<>();
while (ix < hands.length()) {
... | java | private String[] parseClassNames(String propertyName) {
String hands = getProperty(propertyName);
if (hands == null) {
return new String[0];
}
hands = hands.trim();
int ix = 0;
Vector<String> result = new Vector<>();
while (ix < hands.length()) {
... | [
"private",
"String",
"[",
"]",
"parseClassNames",
"(",
"String",
"propertyName",
")",
"{",
"String",
"hands",
"=",
"getProperty",
"(",
"propertyName",
")",
";",
"if",
"(",
"hands",
"==",
"null",
")",
"{",
"return",
"new",
"String",
"[",
"0",
"]",
";",
... | get a list of whitespace separated classnames from a property. | [
"get",
"a",
"list",
"of",
"whitespace",
"separated",
"classnames",
"from",
"a",
"property",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1212-L1240 |
34,232 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.getProperty | public String getProperty(String name) {
Object oval = props.get(name);
String sval = (oval instanceof String) ? (String) oval : null;
return sval;
} | java | public String getProperty(String name) {
Object oval = props.get(name);
String sval = (oval instanceof String) ? (String) oval : null;
return sval;
} | [
"public",
"String",
"getProperty",
"(",
"String",
"name",
")",
"{",
"Object",
"oval",
"=",
"props",
".",
"get",
"(",
"name",
")",
";",
"String",
"sval",
"=",
"(",
"oval",
"instanceof",
"String",
")",
"?",
"(",
"String",
")",
"oval",
":",
"null",
";",... | Get the value of a logging property.
The method returns null if the property is not found.
@param name property name
@return property value | [
"Get",
"the",
"value",
"of",
"a",
"logging",
"property",
".",
"The",
"method",
"returns",
"null",
"if",
"the",
"property",
"is",
"not",
"found",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1299-L1303 |
34,233 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.getStringProperty | String getStringProperty(String name, String defaultValue) {
String val = getProperty(name);
if (val == null) {
return defaultValue;
}
return val.trim();
} | java | String getStringProperty(String name, String defaultValue) {
String val = getProperty(name);
if (val == null) {
return defaultValue;
}
return val.trim();
} | [
"String",
"getStringProperty",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"String",
"val",
"=",
"getProperty",
"(",
"name",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return",
"defaultValue",
";",
"}",
"return",
"val",
".",... | default value. | [
"default",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1308-L1314 |
34,234 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.setLevelsOnExistingLoggers | synchronized private void setLevelsOnExistingLoggers() {
Enumeration<?> enm = props.keys();
while (enm.hasMoreElements()) {
String key = (String) enm.nextElement();
if (!key.endsWith(".level")) {
// Not a level definition.
continue;
}
... | java | synchronized private void setLevelsOnExistingLoggers() {
Enumeration<?> enm = props.keys();
while (enm.hasMoreElements()) {
String key = (String) enm.nextElement();
if (!key.endsWith(".level")) {
// Not a level definition.
continue;
}
... | [
"synchronized",
"private",
"void",
"setLevelsOnExistingLoggers",
"(",
")",
"{",
"Enumeration",
"<",
"?",
">",
"enm",
"=",
"props",
".",
"keys",
"(",
")",
";",
"while",
"(",
"enm",
".",
"hasMoreElements",
"(",
")",
")",
"{",
"String",
"key",
"=",
"(",
"... | changed to apply any level settings to any pre-existing loggers. | [
"changed",
"to",
"apply",
"any",
"level",
"settings",
"to",
"any",
"pre",
"-",
"existing",
"loggers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1509-L1532 |
34,235 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java | LogManager.reflectionStrippedProcessing | private void reflectionStrippedProcessing() {
HashMap<Object, Object> newEntries = new HashMap<>();
for (Map.Entry<Object, Object> entry : props.entrySet()) {
String key = (String) entry.getKey();
int index = key.lastIndexOf('.');
if (index == -1 || index == 0 || inde... | java | private void reflectionStrippedProcessing() {
HashMap<Object, Object> newEntries = new HashMap<>();
for (Map.Entry<Object, Object> entry : props.entrySet()) {
String key = (String) entry.getKey();
int index = key.lastIndexOf('.');
if (index == -1 || index == 0 || inde... | [
"private",
"void",
"reflectionStrippedProcessing",
"(",
")",
"{",
"HashMap",
"<",
"Object",
",",
"Object",
">",
"newEntries",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"Object",
",",
"Object",
">",
"entry",
":",
... | JavaIoFileOutputStream.level instead of java.io.FileOutputStream.level). | [
"JavaIoFileOutputStream",
".",
"level",
"instead",
"of",
"java",
".",
"io",
".",
"FileOutputStream",
".",
"level",
")",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/LogManager.java#L1577-L1593 |
34,236 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java | Long.toUnsignedBigInteger | private static BigInteger toUnsignedBigInteger(long i) {
if (i >= 0L)
return BigInteger.valueOf(i);
else {
int upper = (int) (i >>> 32);
int lower = (int) i;
// return (upper << 32) + lower
return (BigInteger.valueOf(Integer.toUnsignedLong(upp... | java | private static BigInteger toUnsignedBigInteger(long i) {
if (i >= 0L)
return BigInteger.valueOf(i);
else {
int upper = (int) (i >>> 32);
int lower = (int) i;
// return (upper << 32) + lower
return (BigInteger.valueOf(Integer.toUnsignedLong(upp... | [
"private",
"static",
"BigInteger",
"toUnsignedBigInteger",
"(",
"long",
"i",
")",
"{",
"if",
"(",
"i",
">=",
"0L",
")",
"return",
"BigInteger",
".",
"valueOf",
"(",
"i",
")",
";",
"else",
"{",
"int",
"upper",
"=",
"(",
"int",
")",
"(",
"i",
">>>",
... | Return a BigInteger equal to the unsigned value of the
argument. | [
"Return",
"a",
"BigInteger",
"equal",
"to",
"the",
"unsigned",
"value",
"of",
"the",
"argument",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java#L127-L138 |
34,237 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java | Long.divideUnsigned | public static long divideUnsigned(long dividend, long divisor) {
if (divisor < 0L) { // signed comparison
// Answer must be 0 or 1 depending on relative magnitude
// of dividend and divisor.
return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L;
}
if (divi... | java | public static long divideUnsigned(long dividend, long divisor) {
if (divisor < 0L) { // signed comparison
// Answer must be 0 or 1 depending on relative magnitude
// of dividend and divisor.
return (compareUnsigned(dividend, divisor)) < 0 ? 0L :1L;
}
if (divi... | [
"public",
"static",
"long",
"divideUnsigned",
"(",
"long",
"dividend",
",",
"long",
"divisor",
")",
"{",
"if",
"(",
"divisor",
"<",
"0L",
")",
"{",
"// signed comparison",
"// Answer must be 0 or 1 depending on relative magnitude",
"// of dividend and divisor.",
"return",... | Returns the unsigned quotient of dividing the first argument by
the second where each argument and the result is interpreted as
an unsigned value.
<p>Note that in two's complement arithmetic, the three other
basic arithmetic operations of add, subtract, and multiply are
bit-wise identical if the two operands are regar... | [
"Returns",
"the",
"unsigned",
"quotient",
"of",
"dividing",
"the",
"first",
"argument",
"by",
"the",
"second",
"where",
"each",
"argument",
"and",
"the",
"result",
"is",
"interpreted",
"as",
"an",
"unsigned",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java#L1138-L1157 |
34,238 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java | Long.remainderUnsigned | public static long remainderUnsigned(long dividend, long divisor) {
if (dividend > 0 && divisor > 0) { // signed comparisons
return dividend % divisor;
} else {
if (compareUnsigned(dividend, divisor) < 0) // Avoid explicit check for 0 divisor
return dividend;
... | java | public static long remainderUnsigned(long dividend, long divisor) {
if (dividend > 0 && divisor > 0) { // signed comparisons
return dividend % divisor;
} else {
if (compareUnsigned(dividend, divisor) < 0) // Avoid explicit check for 0 divisor
return dividend;
... | [
"public",
"static",
"long",
"remainderUnsigned",
"(",
"long",
"dividend",
",",
"long",
"divisor",
")",
"{",
"if",
"(",
"dividend",
">",
"0",
"&&",
"divisor",
">",
"0",
")",
"{",
"// signed comparisons",
"return",
"dividend",
"%",
"divisor",
";",
"}",
"else... | Returns the unsigned remainder from dividing the first argument
by the second where each argument and the result is interpreted
as an unsigned value.
@param dividend the value to be divided
@param divisor the value doing the dividing
@return the unsigned remainder of the first argument divided by
the second argument
@... | [
"Returns",
"the",
"unsigned",
"remainder",
"from",
"dividing",
"the",
"first",
"argument",
"by",
"the",
"second",
"where",
"each",
"argument",
"and",
"the",
"result",
"is",
"interpreted",
"as",
"an",
"unsigned",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Long.java#L1171-L1181 |
34,239 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemForEach.java | ElemForEach.sortNodes | public DTMIterator sortNodes(
XPathContext xctxt, Vector keys, DTMIterator sourceNodes)
throws TransformerException
{
NodeSorter sorter = new NodeSorter(xctxt);
sourceNodes.setShouldCacheNodes(true);
sourceNodes.runTo(-1);
xctxt.pushContextNodeList(sourceNodes);
try
{
... | java | public DTMIterator sortNodes(
XPathContext xctxt, Vector keys, DTMIterator sourceNodes)
throws TransformerException
{
NodeSorter sorter = new NodeSorter(xctxt);
sourceNodes.setShouldCacheNodes(true);
sourceNodes.runTo(-1);
xctxt.pushContextNodeList(sourceNodes);
try
{
... | [
"public",
"DTMIterator",
"sortNodes",
"(",
"XPathContext",
"xctxt",
",",
"Vector",
"keys",
",",
"DTMIterator",
"sourceNodes",
")",
"throws",
"TransformerException",
"{",
"NodeSorter",
"sorter",
"=",
"new",
"NodeSorter",
"(",
"xctxt",
")",
";",
"sourceNodes",
".",
... | Sort given nodes
@param xctxt The XPath runtime state for the sort.
@param keys Vector of sort keyx
@param sourceNodes Iterator of nodes to sort
@return iterator of sorted nodes
@throws TransformerException | [
"Sort",
"given",
"nodes"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemForEach.java#L293-L314 |
34,240 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java | ICULocaleService.registerObject | public Factory registerObject(Object obj, ULocale locale, int kind, boolean visible) {
Factory factory = new SimpleLocaleKeyFactory(obj, locale, kind, visible);
return registerFactory(factory);
} | java | public Factory registerObject(Object obj, ULocale locale, int kind, boolean visible) {
Factory factory = new SimpleLocaleKeyFactory(obj, locale, kind, visible);
return registerFactory(factory);
} | [
"public",
"Factory",
"registerObject",
"(",
"Object",
"obj",
",",
"ULocale",
"locale",
",",
"int",
"kind",
",",
"boolean",
"visible",
")",
"{",
"Factory",
"factory",
"=",
"new",
"SimpleLocaleKeyFactory",
"(",
"obj",
",",
"locale",
",",
"kind",
",",
"visible"... | Convenience function for callers using locales. This instantiates
a SimpleLocaleKeyFactory, and registers the factory. | [
"Convenience",
"function",
"for",
"callers",
"using",
"locales",
".",
"This",
"instantiates",
"a",
"SimpleLocaleKeyFactory",
"and",
"registers",
"the",
"factory",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java#L119-L122 |
34,241 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java | ICULocaleService.getAvailableLocales | public Locale[] getAvailableLocales() {
// TODO make this wrap getAvailableULocales later
Set<String> visIDs = getVisibleIDs();
Locale[] locales = new Locale[visIDs.size()];
int n = 0;
for (String id : visIDs) {
Locale loc = LocaleUtility.getLocaleFromName(id);
... | java | public Locale[] getAvailableLocales() {
// TODO make this wrap getAvailableULocales later
Set<String> visIDs = getVisibleIDs();
Locale[] locales = new Locale[visIDs.size()];
int n = 0;
for (String id : visIDs) {
Locale loc = LocaleUtility.getLocaleFromName(id);
... | [
"public",
"Locale",
"[",
"]",
"getAvailableLocales",
"(",
")",
"{",
"// TODO make this wrap getAvailableULocales later",
"Set",
"<",
"String",
">",
"visIDs",
"=",
"getVisibleIDs",
"(",
")",
";",
"Locale",
"[",
"]",
"locales",
"=",
"new",
"Locale",
"[",
"visIDs",... | Convenience method for callers using locales. This returns the standard
Locale list, built from the Set of visible ids. | [
"Convenience",
"method",
"for",
"callers",
"using",
"locales",
".",
"This",
"returns",
"the",
"standard",
"Locale",
"list",
"built",
"from",
"the",
"Set",
"of",
"visible",
"ids",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java#L128-L138 |
34,242 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java | ICULocaleService.getAvailableULocales | public ULocale[] getAvailableULocales() {
Set<String> visIDs = getVisibleIDs();
ULocale[] locales = new ULocale[visIDs.size()];
int n = 0;
for (String id : visIDs) {
locales[n++] = new ULocale(id);
}
return locales;
} | java | public ULocale[] getAvailableULocales() {
Set<String> visIDs = getVisibleIDs();
ULocale[] locales = new ULocale[visIDs.size()];
int n = 0;
for (String id : visIDs) {
locales[n++] = new ULocale(id);
}
return locales;
} | [
"public",
"ULocale",
"[",
"]",
"getAvailableULocales",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"visIDs",
"=",
"getVisibleIDs",
"(",
")",
";",
"ULocale",
"[",
"]",
"locales",
"=",
"new",
"ULocale",
"[",
"visIDs",
".",
"size",
"(",
")",
"]",
";",
"in... | Convenience method for callers using locales. This returns the standard
ULocale list, built from the Set of visible ids. | [
"Convenience",
"method",
"for",
"callers",
"using",
"locales",
".",
"This",
"returns",
"the",
"standard",
"ULocale",
"list",
"built",
"from",
"the",
"Set",
"of",
"visible",
"ids",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java#L144-L152 |
34,243 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java | ICULocaleService.validateFallbackLocale | public String validateFallbackLocale() {
ULocale loc = ULocale.getDefault();
if (loc != fallbackLocale) {
synchronized (this) {
if (loc != fallbackLocale) {
fallbackLocale = loc;
fallbackLocaleName = loc.getBaseName();
... | java | public String validateFallbackLocale() {
ULocale loc = ULocale.getDefault();
if (loc != fallbackLocale) {
synchronized (this) {
if (loc != fallbackLocale) {
fallbackLocale = loc;
fallbackLocaleName = loc.getBaseName();
... | [
"public",
"String",
"validateFallbackLocale",
"(",
")",
"{",
"ULocale",
"loc",
"=",
"ULocale",
".",
"getDefault",
"(",
")",
";",
"if",
"(",
"loc",
"!=",
"fallbackLocale",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"if",
"(",
"loc",
"!=",
"fallbackL... | Return the name of the current fallback locale. If it has changed since this was
last accessed, the service cache is cleared. | [
"Return",
"the",
"name",
"of",
"the",
"current",
"fallback",
"locale",
".",
"If",
"it",
"has",
"changed",
"since",
"this",
"was",
"last",
"accessed",
"the",
"service",
"cache",
"is",
"cleared",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICULocaleService.java#L614-L626 |
34,244 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java | Socks4Message.setIP | public void setIP(byte[] ip) {
buffer[INDEX_IP] = ip[0];
buffer[INDEX_IP + 1] = ip[1];
buffer[INDEX_IP + 2] = ip[2];
buffer[INDEX_IP + 3] = ip[3];
} | java | public void setIP(byte[] ip) {
buffer[INDEX_IP] = ip[0];
buffer[INDEX_IP + 1] = ip[1];
buffer[INDEX_IP + 2] = ip[2];
buffer[INDEX_IP + 3] = ip[3];
} | [
"public",
"void",
"setIP",
"(",
"byte",
"[",
"]",
"ip",
")",
"{",
"buffer",
"[",
"INDEX_IP",
"]",
"=",
"ip",
"[",
"0",
"]",
";",
"buffer",
"[",
"INDEX_IP",
"+",
"1",
"]",
"=",
"ip",
"[",
"1",
"]",
";",
"buffer",
"[",
"INDEX_IP",
"+",
"2",
"]"... | Set the IP address. This expects an array of four bytes in host order. | [
"Set",
"the",
"IP",
"address",
".",
"This",
"expects",
"an",
"array",
"of",
"four",
"bytes",
"in",
"host",
"order",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java#L100-L105 |
34,245 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java | Socks4Message.getString | private String getString(int offset, int maxLength) {
int index = offset;
int lastIndex = index + maxLength;
while (index < lastIndex && (buffer[index] != 0)) {
index++;
}
return new String(buffer, offset, index - offset, StandardCharsets.ISO_8859_1);
} | java | private String getString(int offset, int maxLength) {
int index = offset;
int lastIndex = index + maxLength;
while (index < lastIndex && (buffer[index] != 0)) {
index++;
}
return new String(buffer, offset, index - offset, StandardCharsets.ISO_8859_1);
} | [
"private",
"String",
"getString",
"(",
"int",
"offset",
",",
"int",
"maxLength",
")",
"{",
"int",
"index",
"=",
"offset",
";",
"int",
"lastIndex",
"=",
"index",
"+",
"maxLength",
";",
"while",
"(",
"index",
"<",
"lastIndex",
"&&",
"(",
"buffer",
"[",
"... | Get a String from the buffer at the offset given. The method reads until
it encounters a null value or reaches the maxLength given. | [
"Get",
"a",
"String",
"from",
"the",
"buffer",
"at",
"the",
"offset",
"given",
".",
"The",
"method",
"reads",
"until",
"it",
"encounters",
"a",
"null",
"value",
"or",
"reaches",
"the",
"maxLength",
"given",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java#L185-L192 |
34,246 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java | Socks4Message.setString | private void setString(int offset, int maxLength, String theString) {
byte[] stringBytes = theString.getBytes(StandardCharsets.ISO_8859_1);
int length = Math.min(stringBytes.length, maxLength);
System.arraycopy(stringBytes, 0, buffer, offset, length);
buffer[offset + length] = 0;
} | java | private void setString(int offset, int maxLength, String theString) {
byte[] stringBytes = theString.getBytes(StandardCharsets.ISO_8859_1);
int length = Math.min(stringBytes.length, maxLength);
System.arraycopy(stringBytes, 0, buffer, offset, length);
buffer[offset + length] = 0;
} | [
"private",
"void",
"setString",
"(",
"int",
"offset",
",",
"int",
"maxLength",
",",
"String",
"theString",
")",
"{",
"byte",
"[",
"]",
"stringBytes",
"=",
"theString",
".",
"getBytes",
"(",
"StandardCharsets",
".",
"ISO_8859_1",
")",
";",
"int",
"length",
... | Put a string into the buffer at the offset given. | [
"Put",
"a",
"string",
"into",
"the",
"buffer",
"at",
"the",
"offset",
"given",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Socks4Message.java#L204-L209 |
34,247 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/CipherOutputStream.java | CipherOutputStream.flush | public void flush() throws IOException {
if (obuffer != null) {
output.write(obuffer);
obuffer = null;
}
output.flush();
} | java | public void flush() throws IOException {
if (obuffer != null) {
output.write(obuffer);
obuffer = null;
}
output.flush();
} | [
"public",
"void",
"flush",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"obuffer",
"!=",
"null",
")",
"{",
"output",
".",
"write",
"(",
"obuffer",
")",
";",
"obuffer",
"=",
"null",
";",
"}",
"output",
".",
"flush",
"(",
")",
";",
"}"
] | Flushes this output stream by forcing any buffered output bytes
that have already been processed by the encapsulated cipher object
to be written out.
<p>Any bytes buffered by the encapsulated cipher
and waiting to be processed by it will not be written out. For example,
if the encapsulated cipher is a block cipher, an... | [
"Flushes",
"this",
"output",
"stream",
"by",
"forcing",
"any",
"buffered",
"output",
"bytes",
"that",
"have",
"already",
"been",
"processed",
"by",
"the",
"encapsulated",
"cipher",
"object",
"to",
"be",
"written",
"out",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/CipherOutputStream.java#L179-L185 |
34,248 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java | AbstractSelectableChannel.configureBlocking | public final SelectableChannel configureBlocking(boolean block)
throws IOException
{
synchronized (regLock) {
if (!isOpen())
throw new ClosedChannelException();
if (blocking == block)
return this;
if (block && haveValidKeys())
... | java | public final SelectableChannel configureBlocking(boolean block)
throws IOException
{
synchronized (regLock) {
if (!isOpen())
throw new ClosedChannelException();
if (blocking == block)
return this;
if (block && haveValidKeys())
... | [
"public",
"final",
"SelectableChannel",
"configureBlocking",
"(",
"boolean",
"block",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"regLock",
")",
"{",
"if",
"(",
"!",
"isOpen",
"(",
")",
")",
"throw",
"new",
"ClosedChannelException",
"(",
")",
";",... | Adjusts this channel's blocking mode.
<p> If the given blocking mode is different from the current blocking
mode then this method invokes the {@link #implConfigureBlocking
implConfigureBlocking} method, while holding the appropriate locks, in
order to change the mode. </p> | [
"Adjusts",
"this",
"channel",
"s",
"blocking",
"mode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/spi/AbstractSelectableChannel.java#L284-L298 |
34,249 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java | TextTrieMap.put | public TextTrieMap<V> put(CharSequence text, V val) {
CharIterator chitr = new CharIterator(text, 0, _ignoreCase);
_root.add(chitr, val);
return this;
} | java | public TextTrieMap<V> put(CharSequence text, V val) {
CharIterator chitr = new CharIterator(text, 0, _ignoreCase);
_root.add(chitr, val);
return this;
} | [
"public",
"TextTrieMap",
"<",
"V",
">",
"put",
"(",
"CharSequence",
"text",
",",
"V",
"val",
")",
"{",
"CharIterator",
"chitr",
"=",
"new",
"CharIterator",
"(",
"text",
",",
"0",
",",
"_ignoreCase",
")",
";",
"_root",
".",
"add",
"(",
"chitr",
",",
"... | Adds the text key and its associated object in this object.
@param text The text.
@param val The value object associated with the text. | [
"Adds",
"the",
"text",
"key",
"and",
"its",
"associated",
"object",
"in",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java#L44-L48 |
34,250 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java | TextTrieMap.get | public Iterator<V> get(CharSequence text, int start) {
return get(text, start, null);
} | java | public Iterator<V> get(CharSequence text, int start) {
return get(text, start, null);
} | [
"public",
"Iterator",
"<",
"V",
">",
"get",
"(",
"CharSequence",
"text",
",",
"int",
"start",
")",
"{",
"return",
"get",
"(",
"text",
",",
"start",
",",
"null",
")",
";",
"}"
] | Gets an iterator of the objects associated with the
longest prefix matching string key starting at the
specified position.
@param text The text to be matched with prefixes.
@param start The start index of of the text
@return An iterator of the objects associated with the
longest prefix matching matching key, or null i... | [
"Gets",
"an",
"iterator",
"of",
"the",
"objects",
"associated",
"with",
"the",
"longest",
"prefix",
"matching",
"string",
"key",
"starting",
"at",
"the",
"specified",
"position",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TextTrieMap.java#L74-L76 |
34,251 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getExemplarSet | public UnicodeSet getExemplarSet(int options, int extype) {
String [] exemplarSetTypes = {
"ExemplarCharacters",
"AuxExemplarCharacters",
"ExemplarCharactersIndex",
"ExemplarCharactersCurrency",
"ExemplarCharactersPunctuation"
... | java | public UnicodeSet getExemplarSet(int options, int extype) {
String [] exemplarSetTypes = {
"ExemplarCharacters",
"AuxExemplarCharacters",
"ExemplarCharactersIndex",
"ExemplarCharactersCurrency",
"ExemplarCharactersPunctuation"
... | [
"public",
"UnicodeSet",
"getExemplarSet",
"(",
"int",
"options",
",",
"int",
"extype",
")",
"{",
"String",
"[",
"]",
"exemplarSetTypes",
"=",
"{",
"\"ExemplarCharacters\"",
",",
"\"AuxExemplarCharacters\"",
",",
"\"ExemplarCharactersIndex\"",
",",
"\"ExemplarCharactersC... | Returns the set of exemplar characters for a locale.
@param options Bitmask for options to apply to the exemplar pattern.
Specify zero to retrieve the exemplar set as it is
defined in the locale data. Specify
UnicodeSet.CASE to retrieve a case-folded exemplar
set. See {@link UnicodeSet#applyPattern(String,
int)} f... | [
"Returns",
"the",
"set",
"of",
"exemplar",
"characters",
"for",
"a",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L178-L206 |
34,252 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getInstance | public static final LocaleData getInstance(ULocale locale) {
LocaleData ld = new LocaleData();
ld.bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
ld.langBundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_LANG_BASE_NAME, locale)... | java | public static final LocaleData getInstance(ULocale locale) {
LocaleData ld = new LocaleData();
ld.bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
ld.langBundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_LANG_BASE_NAME, locale)... | [
"public",
"static",
"final",
"LocaleData",
"getInstance",
"(",
"ULocale",
"locale",
")",
"{",
"LocaleData",
"ld",
"=",
"new",
"LocaleData",
"(",
")",
";",
"ld",
".",
"bundle",
"=",
"(",
"ICUResourceBundle",
")",
"UResourceBundle",
".",
"getBundleInstance",
"("... | Gets the LocaleData object associated with the ULocale specified in locale
@param locale Locale with thich the locale data object is associated.
@return A locale data object. | [
"Gets",
"the",
"LocaleData",
"object",
"associated",
"with",
"the",
"ULocale",
"specified",
"in",
"locale"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L214-L220 |
34,253 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getDelimiter | public String getDelimiter(int type) {
ICUResourceBundle delimitersBundle = (ICUResourceBundle) bundle.get("delimiters");
// Only some of the quotation marks may be here. So we make sure that we do a multilevel fallback.
ICUResourceBundle stringBundle = delimitersBundle.getWithFallback(DELIMITER... | java | public String getDelimiter(int type) {
ICUResourceBundle delimitersBundle = (ICUResourceBundle) bundle.get("delimiters");
// Only some of the quotation marks may be here. So we make sure that we do a multilevel fallback.
ICUResourceBundle stringBundle = delimitersBundle.getWithFallback(DELIMITER... | [
"public",
"String",
"getDelimiter",
"(",
"int",
"type",
")",
"{",
"ICUResourceBundle",
"delimitersBundle",
"=",
"(",
"ICUResourceBundle",
")",
"bundle",
".",
"get",
"(",
"\"delimiters\"",
")",
";",
"// Only some of the quotation marks may be here. So we make sure that we do... | Retrieves a delimiter string from the locale data.
@param type The type of delimiter string desired. Currently,
the valid choices are QUOTATION_START, QUOTATION_END,
ALT_QUOTATION_START, or ALT_QUOTATION_END.
@return The desired delimiter string. | [
"Retrieves",
"a",
"delimiter",
"string",
"from",
"the",
"locale",
"data",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L271-L280 |
34,254 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.measurementTypeBundleForLocale | private static UResourceBundle measurementTypeBundleForLocale(ULocale locale, String measurementType){
// Much of this is taken from getCalendarType in impl/CalendarUtil.java
UResourceBundle measTypeBundle = null;
String region = ULocale.getRegionForSupplementalData(locale, true);
try {
... | java | private static UResourceBundle measurementTypeBundleForLocale(ULocale locale, String measurementType){
// Much of this is taken from getCalendarType in impl/CalendarUtil.java
UResourceBundle measTypeBundle = null;
String region = ULocale.getRegionForSupplementalData(locale, true);
try {
... | [
"private",
"static",
"UResourceBundle",
"measurementTypeBundleForLocale",
"(",
"ULocale",
"locale",
",",
"String",
"measurementType",
")",
"{",
"// Much of this is taken from getCalendarType in impl/CalendarUtil.java",
"UResourceBundle",
"measTypeBundle",
"=",
"null",
";",
"Strin... | Utility for getMeasurementSystem and getPaperSize | [
"Utility",
"for",
"getMeasurementSystem",
"and",
"getPaperSize"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L285-L308 |
34,255 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getMeasurementSystem | public static final MeasurementSystem getMeasurementSystem(ULocale locale){
UResourceBundle sysBundle = measurementTypeBundleForLocale(locale, MEASUREMENT_SYSTEM);
switch (sysBundle.getInt()) {
case 0: return MeasurementSystem.SI;
case 1: return MeasurementSystem.US;
case 2: ret... | java | public static final MeasurementSystem getMeasurementSystem(ULocale locale){
UResourceBundle sysBundle = measurementTypeBundleForLocale(locale, MEASUREMENT_SYSTEM);
switch (sysBundle.getInt()) {
case 0: return MeasurementSystem.SI;
case 1: return MeasurementSystem.US;
case 2: ret... | [
"public",
"static",
"final",
"MeasurementSystem",
"getMeasurementSystem",
"(",
"ULocale",
"locale",
")",
"{",
"UResourceBundle",
"sysBundle",
"=",
"measurementTypeBundleForLocale",
"(",
"locale",
",",
"MEASUREMENT_SYSTEM",
")",
";",
"switch",
"(",
"sysBundle",
".",
"g... | Returns the measurement system used in the locale specified by the locale.
@param locale The locale for which the measurement system to be retrieved.
@return MeasurementSystem the measurement system used in the locale. | [
"Returns",
"the",
"measurement",
"system",
"used",
"in",
"the",
"locale",
"specified",
"by",
"the",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L340-L352 |
34,256 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getLocaleSeparator | public String getLocaleSeparator() {
String sub0 = "{0}";
String sub1 = "{1}";
ICUResourceBundle locDispBundle = (ICUResourceBundle) langBundle.get(LOCALE_DISPLAY_PATTERN);
String localeSeparator = locDispBundle.getStringWithFallback(SEPARATOR);
int index0 = localeSeparator.inde... | java | public String getLocaleSeparator() {
String sub0 = "{0}";
String sub1 = "{1}";
ICUResourceBundle locDispBundle = (ICUResourceBundle) langBundle.get(LOCALE_DISPLAY_PATTERN);
String localeSeparator = locDispBundle.getStringWithFallback(SEPARATOR);
int index0 = localeSeparator.inde... | [
"public",
"String",
"getLocaleSeparator",
"(",
")",
"{",
"String",
"sub0",
"=",
"\"{0}\"",
";",
"String",
"sub1",
"=",
"\"{1}\"",
";",
"ICUResourceBundle",
"locDispBundle",
"=",
"(",
"ICUResourceBundle",
")",
"langBundle",
".",
"get",
"(",
"LOCALE_DISPLAY_PATTERN"... | Returns LocaleDisplaySeparator for this locale.
@return locale display separator as a char. | [
"Returns",
"LocaleDisplaySeparator",
"for",
"this",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L408-L419 |
34,257 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java | LocaleData.getCLDRVersion | public static VersionInfo getCLDRVersion() {
// fetching this data should be idempotent.
if(gCLDRVersion == null) {
// from ZoneMeta.java
UResourceBundle supplementalDataBundle = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, "supplementalData", ICUResourceBundle.ICU_DA... | java | public static VersionInfo getCLDRVersion() {
// fetching this data should be idempotent.
if(gCLDRVersion == null) {
// from ZoneMeta.java
UResourceBundle supplementalDataBundle = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, "supplementalData", ICUResourceBundle.ICU_DA... | [
"public",
"static",
"VersionInfo",
"getCLDRVersion",
"(",
")",
"{",
"// fetching this data should be idempotent.",
"if",
"(",
"gCLDRVersion",
"==",
"null",
")",
"{",
"// from ZoneMeta.java",
"UResourceBundle",
"supplementalDataBundle",
"=",
"UResourceBundle",
".",
"getBundl... | Returns the current CLDR version | [
"Returns",
"the",
"current",
"CLDR",
"version"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleData.java#L426-L435 |
34,258 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncId.java | FuncId.getNodesByID | private StringVector getNodesByID(XPathContext xctxt, int docContext,
String refval, StringVector usedrefs,
NodeSetDTM nodeSet, boolean mayBeMore)
{
if (null != refval)
{
String ref = null;
// DOMHelper dh = xctxt.getDOMHelper... | java | private StringVector getNodesByID(XPathContext xctxt, int docContext,
String refval, StringVector usedrefs,
NodeSetDTM nodeSet, boolean mayBeMore)
{
if (null != refval)
{
String ref = null;
// DOMHelper dh = xctxt.getDOMHelper... | [
"private",
"StringVector",
"getNodesByID",
"(",
"XPathContext",
"xctxt",
",",
"int",
"docContext",
",",
"String",
"refval",
",",
"StringVector",
"usedrefs",
",",
"NodeSetDTM",
"nodeSet",
",",
"boolean",
"mayBeMore",
")",
"{",
"if",
"(",
"null",
"!=",
"refval",
... | Fill in a list with nodes that match a space delimited list if ID
ID references.
@param xctxt The runtime XPath context.
@param docContext The document where the nodes are being looked for.
@param refval A space delimited list of ID references.
@param usedrefs List of references for which nodes were found.
@param node... | [
"Fill",
"in",
"a",
"list",
"with",
"nodes",
"that",
"match",
"a",
"space",
"delimited",
"list",
"if",
"ID",
"ID",
"references",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/functions/FuncId.java#L55-L96 |
34,259 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java | FCDIterCollationIterator.switchToForward | private void switchToForward() {
assert(state == State.ITER_CHECK_BWD ||
(state == State.ITER_IN_FCD_SEGMENT && pos == limit) ||
(state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == normalized.length()));
if(state == State.ITER_CHECK_BWD) {
// Turn aro... | java | private void switchToForward() {
assert(state == State.ITER_CHECK_BWD ||
(state == State.ITER_IN_FCD_SEGMENT && pos == limit) ||
(state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == normalized.length()));
if(state == State.ITER_CHECK_BWD) {
// Turn aro... | [
"private",
"void",
"switchToForward",
"(",
")",
"{",
"assert",
"(",
"state",
"==",
"State",
".",
"ITER_CHECK_BWD",
"||",
"(",
"state",
"==",
"State",
".",
"ITER_IN_FCD_SEGMENT",
"&&",
"pos",
"==",
"limit",
")",
"||",
"(",
"state",
".",
"compareTo",
"(",
... | Switches to forward checking if possible. | [
"Switches",
"to",
"forward",
"checking",
"if",
"possible",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java#L226-L252 |
34,260 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java | FCDIterCollationIterator.nextSegment | private boolean nextSegment() {
assert(state == State.ITER_CHECK_FWD);
// The input text [start..(iter index)[ passes the FCD check.
pos = iter.getIndex();
// Collect the characters being checked, in case they need to be normalized.
if(s == null) {
s = new StringBuild... | java | private boolean nextSegment() {
assert(state == State.ITER_CHECK_FWD);
// The input text [start..(iter index)[ passes the FCD check.
pos = iter.getIndex();
// Collect the characters being checked, in case they need to be normalized.
if(s == null) {
s = new StringBuild... | [
"private",
"boolean",
"nextSegment",
"(",
")",
"{",
"assert",
"(",
"state",
"==",
"State",
".",
"ITER_CHECK_FWD",
")",
";",
"// The input text [start..(iter index)[ passes the FCD check.",
"pos",
"=",
"iter",
".",
"getIndex",
"(",
")",
";",
"// Collect the characters ... | Extends the FCD text segment forward or normalizes around pos.
@return true if success | [
"Extends",
"the",
"FCD",
"text",
"segment",
"forward",
"or",
"normalizes",
"around",
"pos",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java#L258-L310 |
34,261 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java | FCDIterCollationIterator.switchToBackward | private void switchToBackward() {
assert(state == State.ITER_CHECK_FWD ||
(state == State.ITER_IN_FCD_SEGMENT && pos == start) ||
(state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == 0));
if(state == State.ITER_CHECK_FWD) {
// Turn around from forward ... | java | private void switchToBackward() {
assert(state == State.ITER_CHECK_FWD ||
(state == State.ITER_IN_FCD_SEGMENT && pos == start) ||
(state.compareTo(State.IN_NORM_ITER_AT_LIMIT) >= 0 && pos == 0));
if(state == State.ITER_CHECK_FWD) {
// Turn around from forward ... | [
"private",
"void",
"switchToBackward",
"(",
")",
"{",
"assert",
"(",
"state",
"==",
"State",
".",
"ITER_CHECK_FWD",
"||",
"(",
"state",
"==",
"State",
".",
"ITER_IN_FCD_SEGMENT",
"&&",
"pos",
"==",
"start",
")",
"||",
"(",
"state",
".",
"compareTo",
"(",
... | Switches to backward checking. | [
"Switches",
"to",
"backward",
"checking",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java#L315-L341 |
34,262 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java | FCDIterCollationIterator.previousSegment | private boolean previousSegment() {
assert(state == State.ITER_CHECK_BWD);
// The input text [(iter index)..limit[ passes the FCD check.
pos = iter.getIndex();
// Collect the characters being checked, in case they need to be normalized.
if(s == null) {
s = new StringB... | java | private boolean previousSegment() {
assert(state == State.ITER_CHECK_BWD);
// The input text [(iter index)..limit[ passes the FCD check.
pos = iter.getIndex();
// Collect the characters being checked, in case they need to be normalized.
if(s == null) {
s = new StringB... | [
"private",
"boolean",
"previousSegment",
"(",
")",
"{",
"assert",
"(",
"state",
"==",
"State",
".",
"ITER_CHECK_BWD",
")",
";",
"// The input text [(iter index)..limit[ passes the FCD check.",
"pos",
"=",
"iter",
".",
"getIndex",
"(",
")",
";",
"// Collect the charact... | Extends the FCD text segment backward or normalizes around pos.
@return true if success | [
"Extends",
"the",
"FCD",
"text",
"segment",
"backward",
"or",
"normalizes",
"around",
"pos",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/FCDIterCollationIterator.java#L347-L402 |
34,263 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateIssuerExtension.java | CertificateIssuerExtension.get | public GeneralNames get(String name) throws IOException {
if (name.equalsIgnoreCase(ISSUER)) {
return names;
} else {
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:CertificateIssuer");
}
} | java | public GeneralNames get(String name) throws IOException {
if (name.equalsIgnoreCase(ISSUER)) {
return names;
} else {
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:CertificateIssuer");
}
} | [
"public",
"GeneralNames",
"get",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"if",
"(",
"name",
".",
"equalsIgnoreCase",
"(",
"ISSUER",
")",
")",
"{",
"return",
"names",
";",
"}",
"else",
"{",
"throw",
"new",
"IOException",
"(",
"\"Attribute ... | Gets the attribute value.
@throws IOException on error | [
"Gets",
"the",
"attribute",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateIssuerExtension.java#L144-L151 |
34,264 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateIssuerExtension.java | CertificateIssuerExtension.delete | public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(ISSUER)) {
names = null;
} else {
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:CertificateIssuer");
}
encodeThis();
} | java | public void delete(String name) throws IOException {
if (name.equalsIgnoreCase(ISSUER)) {
names = null;
} else {
throw new IOException("Attribute name not recognized by " +
"CertAttrSet:CertificateIssuer");
}
encodeThis();
} | [
"public",
"void",
"delete",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"if",
"(",
"name",
".",
"equalsIgnoreCase",
"(",
"ISSUER",
")",
")",
"{",
"names",
"=",
"null",
";",
"}",
"else",
"{",
"throw",
"new",
"IOException",
"(",
"\"Attribute ... | Deletes the attribute value.
@throws IOException on error | [
"Deletes",
"the",
"attribute",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificateIssuerExtension.java#L158-L166 |
34,265 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java | DateFormat.format | public final StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition fieldPosition)
{
if (obj instanceof Date)
return format( (Date)obj, toAppendTo, fieldPosition );
else if (obj instanceof Number)
return format( new Date(((... | java | public final StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition fieldPosition)
{
if (obj instanceof Date)
return format( (Date)obj, toAppendTo, fieldPosition );
else if (obj instanceof Number)
return format( new Date(((... | [
"public",
"final",
"StringBuffer",
"format",
"(",
"Object",
"obj",
",",
"StringBuffer",
"toAppendTo",
",",
"FieldPosition",
"fieldPosition",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Date",
")",
"return",
"format",
"(",
"(",
"Date",
")",
"obj",
",",
"toAppe... | Overrides Format.
Formats a time object into a time string. Examples of time objects
are a time value expressed in milliseconds and a Date object.
@param obj must be a Number or a Date.
@param toAppendTo the string buffer for the returning time string.
@return the string buffer passed in as toAppendTo, with formatted t... | [
"Overrides",
"Format",
".",
"Formats",
"a",
"time",
"object",
"into",
"a",
"time",
"string",
".",
"Examples",
"of",
"time",
"objects",
"are",
"a",
"time",
"value",
"expressed",
"in",
"milliseconds",
"and",
"a",
"Date",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java#L294-L304 |
34,266 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java | DateFormat.getTimeInstance | public final static DateFormat getTimeInstance(int style)
{
return get(style, 0, 1, Locale.getDefault(Locale.Category.FORMAT));
} | java | public final static DateFormat getTimeInstance(int style)
{
return get(style, 0, 1, Locale.getDefault(Locale.Category.FORMAT));
} | [
"public",
"final",
"static",
"DateFormat",
"getTimeInstance",
"(",
"int",
"style",
")",
"{",
"return",
"get",
"(",
"style",
",",
"0",
",",
"1",
",",
"Locale",
".",
"getDefault",
"(",
"Locale",
".",
"Category",
".",
"FORMAT",
")",
")",
";",
"}"
] | Gets the time formatter with the given formatting style
for the default locale.
@param style the given formatting style. For example,
SHORT for "h:mm a" in the US locale.
@return a time formatter. | [
"Gets",
"the",
"time",
"formatter",
"with",
"the",
"given",
"formatting",
"style",
"for",
"the",
"default",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java#L458-L461 |
34,267 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java | DateFormat.getDateInstance | public final static DateFormat getDateInstance(int style)
{
return get(0, style, 2, Locale.getDefault(Locale.Category.FORMAT));
} | java | public final static DateFormat getDateInstance(int style)
{
return get(0, style, 2, Locale.getDefault(Locale.Category.FORMAT));
} | [
"public",
"final",
"static",
"DateFormat",
"getDateInstance",
"(",
"int",
"style",
")",
"{",
"return",
"get",
"(",
"0",
",",
"style",
",",
"2",
",",
"Locale",
".",
"getDefault",
"(",
"Locale",
".",
"Category",
".",
"FORMAT",
")",
")",
";",
"}"
] | Gets the date formatter with the given formatting style
for the default locale.
@param style the given formatting style. For example,
SHORT for "M/d/yy" in the US locale.
@return a date formatter. | [
"Gets",
"the",
"date",
"formatter",
"with",
"the",
"given",
"formatting",
"style",
"for",
"the",
"default",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormat.java#L494-L497 |
34,268 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.create | protected synchronized void create() throws SocketException {
ResourceManager.beforeUdpCreate();
fd = new FileDescriptor();
try {
datagramSocketCreate();
} catch (SocketException ioe) {
ResourceManager.afterUdpClose();
fd = null;
throw ioe;... | java | protected synchronized void create() throws SocketException {
ResourceManager.beforeUdpCreate();
fd = new FileDescriptor();
try {
datagramSocketCreate();
} catch (SocketException ioe) {
ResourceManager.afterUdpClose();
fd = null;
throw ioe;... | [
"protected",
"synchronized",
"void",
"create",
"(",
")",
"throws",
"SocketException",
"{",
"ResourceManager",
".",
"beforeUdpCreate",
"(",
")",
";",
"fd",
"=",
"new",
"FileDescriptor",
"(",
")",
";",
"try",
"{",
"datagramSocketCreate",
"(",
")",
";",
"}",
"c... | Creates a datagram socket | [
"Creates",
"a",
"datagram",
"socket"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L74-L88 |
34,269 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.connect | protected void connect(InetAddress address, int port) throws SocketException {
BlockGuard.getThreadPolicy().onNetwork();
connect0(address, port);
connectedAddress = address;
connectedPort = port;
connected = true;
} | java | protected void connect(InetAddress address, int port) throws SocketException {
BlockGuard.getThreadPolicy().onNetwork();
connect0(address, port);
connectedAddress = address;
connectedPort = port;
connected = true;
} | [
"protected",
"void",
"connect",
"(",
"InetAddress",
"address",
",",
"int",
"port",
")",
"throws",
"SocketException",
"{",
"BlockGuard",
".",
"getThreadPolicy",
"(",
")",
".",
"onNetwork",
"(",
")",
";",
"connect0",
"(",
"address",
",",
"port",
")",
";",
"c... | Connects a datagram socket to a remote destination. This associates the remote
address with the local socket so that datagrams may only be sent to this destination
and received from this destination.
@param address the remote InetAddress to connect to
@param port the remote port number | [
"Connects",
"a",
"datagram",
"socket",
"to",
"a",
"remote",
"destination",
".",
"This",
"associates",
"the",
"remote",
"address",
"with",
"the",
"local",
"socket",
"so",
"that",
"datagrams",
"may",
"only",
"be",
"sent",
"to",
"this",
"destination",
"and",
"r... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L115-L121 |
34,270 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.disconnect | protected void disconnect() {
disconnect0(connectedAddress.holder().getFamily());
connected = false;
connectedAddress = null;
connectedPort = -1;
} | java | protected void disconnect() {
disconnect0(connectedAddress.holder().getFamily());
connected = false;
connectedAddress = null;
connectedPort = -1;
} | [
"protected",
"void",
"disconnect",
"(",
")",
"{",
"disconnect0",
"(",
"connectedAddress",
".",
"holder",
"(",
")",
".",
"getFamily",
"(",
")",
")",
";",
"connected",
"=",
"false",
";",
"connectedAddress",
"=",
"null",
";",
"connectedPort",
"=",
"-",
"1",
... | Disconnects a previously connected socket. Does nothing if the socket was
not connected already. | [
"Disconnects",
"a",
"previously",
"connected",
"socket",
".",
"Does",
"nothing",
"if",
"the",
"socket",
"was",
"not",
"connected",
"already",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L127-L132 |
34,271 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.joinGroup | protected void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
throws IOException {
if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress))
throw new IllegalArgumentException("Unsupported address type");
join(((InetSocketAddress)mcastaddr).getAddress(), netIf);... | java | protected void joinGroup(SocketAddress mcastaddr, NetworkInterface netIf)
throws IOException {
if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress))
throw new IllegalArgumentException("Unsupported address type");
join(((InetSocketAddress)mcastaddr).getAddress(), netIf);... | [
"protected",
"void",
"joinGroup",
"(",
"SocketAddress",
"mcastaddr",
",",
"NetworkInterface",
"netIf",
")",
"throws",
"IOException",
"{",
"if",
"(",
"mcastaddr",
"==",
"null",
"||",
"!",
"(",
"mcastaddr",
"instanceof",
"InetSocketAddress",
")",
")",
"throw",
"ne... | Join the multicast group.
@param mcastaddr multicast address to join.
@param netIf specifies the local interface to receive multicast
datagram packets
@throws IllegalArgumentException if mcastaddr is null or is a
SocketAddress subclass not supported by this socket
@since 1.4 | [
"Join",
"the",
"multicast",
"group",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L199-L204 |
34,272 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.leaveGroup | protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)
throws IOException {
if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress))
throw new IllegalArgumentException("Unsupported address type");
leave(((InetSocketAddress)mcastaddr).getAddress(), netIf... | java | protected void leaveGroup(SocketAddress mcastaddr, NetworkInterface netIf)
throws IOException {
if (mcastaddr == null || !(mcastaddr instanceof InetSocketAddress))
throw new IllegalArgumentException("Unsupported address type");
leave(((InetSocketAddress)mcastaddr).getAddress(), netIf... | [
"protected",
"void",
"leaveGroup",
"(",
"SocketAddress",
"mcastaddr",
",",
"NetworkInterface",
"netIf",
")",
"throws",
"IOException",
"{",
"if",
"(",
"mcastaddr",
"==",
"null",
"||",
"!",
"(",
"mcastaddr",
"instanceof",
"InetSocketAddress",
")",
")",
"throw",
"n... | Leave the multicast group.
@param mcastaddr multicast address to leave.
@param netIf specified the local interface to leave the group at
@throws IllegalArgumentException if mcastaddr is null or is a
SocketAddress subclass not supported by this socket
@since 1.4 | [
"Leave",
"the",
"multicast",
"group",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L217-L222 |
34,273 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java | AbstractPlainDatagramSocketImpl.getNIFirstAddress | static InetAddress getNIFirstAddress(int niIndex) throws SocketException {
if (niIndex > 0) {
NetworkInterface networkInterface = NetworkInterface.getByIndex(niIndex);
Enumeration<InetAddress> addressesEnum = networkInterface.getInetAddresses();
if (addressesEnum.hasMoreEleme... | java | static InetAddress getNIFirstAddress(int niIndex) throws SocketException {
if (niIndex > 0) {
NetworkInterface networkInterface = NetworkInterface.getByIndex(niIndex);
Enumeration<InetAddress> addressesEnum = networkInterface.getInetAddresses();
if (addressesEnum.hasMoreEleme... | [
"static",
"InetAddress",
"getNIFirstAddress",
"(",
"int",
"niIndex",
")",
"throws",
"SocketException",
"{",
"if",
"(",
"niIndex",
">",
"0",
")",
"{",
"NetworkInterface",
"networkInterface",
"=",
"NetworkInterface",
".",
"getByIndex",
"(",
"niIndex",
")",
";",
"E... | Return the first address bound to NetworkInterface with given ID.
In case of niIndex == 0 or no address return anyLocalAddress | [
"Return",
"the",
"first",
"address",
"bound",
"to",
"NetworkInterface",
"with",
"given",
"ID",
".",
"In",
"case",
"of",
"niIndex",
"==",
"0",
"or",
"no",
"address",
"return",
"anyLocalAddress"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainDatagramSocketImpl.java#L370-L379 |
34,274 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLSocket.java | SSLSocket.getSSLParameters | public SSLParameters getSSLParameters() {
SSLParameters params = new SSLParameters();
params.setCipherSuites(getEnabledCipherSuites());
params.setProtocols(getEnabledProtocols());
if (getNeedClientAuth()) {
params.setNeedClientAuth(true);
} else if (getWantClientAuth(... | java | public SSLParameters getSSLParameters() {
SSLParameters params = new SSLParameters();
params.setCipherSuites(getEnabledCipherSuites());
params.setProtocols(getEnabledProtocols());
if (getNeedClientAuth()) {
params.setNeedClientAuth(true);
} else if (getWantClientAuth(... | [
"public",
"SSLParameters",
"getSSLParameters",
"(",
")",
"{",
"SSLParameters",
"params",
"=",
"new",
"SSLParameters",
"(",
")",
";",
"params",
".",
"setCipherSuites",
"(",
"getEnabledCipherSuites",
"(",
")",
")",
";",
"params",
".",
"setProtocols",
"(",
"getEnab... | Returns the SSLParameters in effect for this SSLSocket.
The ciphersuites and protocols of the returned SSLParameters
are always non-null.
@return the SSLParameters in effect for this SSLSocket.
@since 1.6 | [
"Returns",
"the",
"SSLParameters",
"in",
"effect",
"for",
"this",
"SSLSocket",
".",
"The",
"ciphersuites",
"and",
"protocols",
"of",
"the",
"returned",
"SSLParameters",
"are",
"always",
"non",
"-",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLSocket.java#L1342-L1352 |
34,275 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/UncheckedIOException.java | UncheckedIOException.readObject | private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
Throwable cause = super.getCause();
if (!(cause instanceof IOException))
throw new InvalidObjectException("Cause must be an IOException");
} | java | private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
Throwable cause = super.getCause();
if (!(cause instanceof IOException))
throw new InvalidObjectException("Cause must be an IOException");
} | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"s",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"s",
".",
"defaultReadObject",
"(",
")",
";",
"Throwable",
"cause",
"=",
"super",
".",
"getCause",
"(",
")",
";",
"if",
"(",
"!"... | Called to read the object from a stream.
@throws InvalidObjectException
if the object is invalid or has a cause that is not
an {@code IOException} | [
"Called",
"to",
"read",
"the",
"object",
"from",
"a",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/UncheckedIOException.java#L82-L89 |
34,276 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java | ArrayBlockingQueue.enqueue | private void enqueue(E x) {
// assert lock.getHoldCount() == 1;
// assert items[putIndex] == null;
final Object[] items = this.items;
items[putIndex] = x;
if (++putIndex == items.length) putIndex = 0;
count++;
notEmpty.signal();
} | java | private void enqueue(E x) {
// assert lock.getHoldCount() == 1;
// assert items[putIndex] == null;
final Object[] items = this.items;
items[putIndex] = x;
if (++putIndex == items.length) putIndex = 0;
count++;
notEmpty.signal();
} | [
"private",
"void",
"enqueue",
"(",
"E",
"x",
")",
"{",
"// assert lock.getHoldCount() == 1;",
"// assert items[putIndex] == null;",
"final",
"Object",
"[",
"]",
"items",
"=",
"this",
".",
"items",
";",
"items",
"[",
"putIndex",
"]",
"=",
"x",
";",
"if",
"(",
... | Inserts element at current put position, advances, and signals.
Call only when holding lock. | [
"Inserts",
"element",
"at",
"current",
"put",
"position",
"advances",
"and",
"signals",
".",
"Call",
"only",
"when",
"holding",
"lock",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java#L153-L161 |
34,277 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java | ArrayBlockingQueue.dequeue | private E dequeue() {
// assert lock.getHoldCount() == 1;
// assert items[takeIndex] != null;
final Object[] items = this.items;
@SuppressWarnings("unchecked")
E x = (E) items[takeIndex];
items[takeIndex] = null;
if (++takeIndex == items.length) takeIndex = 0;
... | java | private E dequeue() {
// assert lock.getHoldCount() == 1;
// assert items[takeIndex] != null;
final Object[] items = this.items;
@SuppressWarnings("unchecked")
E x = (E) items[takeIndex];
items[takeIndex] = null;
if (++takeIndex == items.length) takeIndex = 0;
... | [
"private",
"E",
"dequeue",
"(",
")",
"{",
"// assert lock.getHoldCount() == 1;",
"// assert items[takeIndex] != null;",
"final",
"Object",
"[",
"]",
"items",
"=",
"this",
".",
"items",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"E",
"x",
"=",
"(",
... | Extracts element at current take position, advances, and signals.
Call only when holding lock. | [
"Extracts",
"element",
"at",
"current",
"take",
"position",
"advances",
"and",
"signals",
".",
"Call",
"only",
"when",
"holding",
"lock",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java#L167-L180 |
34,278 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java | ArrayBlockingQueue.put | public void put(E e) throws InterruptedException {
Objects.requireNonNull(e);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
while (count == items.length)
notFull.await();
enqueue(e);
} finally {
lock.unlo... | java | public void put(E e) throws InterruptedException {
Objects.requireNonNull(e);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
while (count == items.length)
notFull.await();
enqueue(e);
} finally {
lock.unlo... | [
"public",
"void",
"put",
"(",
"E",
"e",
")",
"throws",
"InterruptedException",
"{",
"Objects",
".",
"requireNonNull",
"(",
"e",
")",
";",
"final",
"ReentrantLock",
"lock",
"=",
"this",
".",
"lock",
";",
"lock",
".",
"lockInterruptibly",
"(",
")",
";",
"t... | Inserts the specified element at the tail of this queue, waiting
for space to become available if the queue is full.
@throws InterruptedException {@inheritDoc}
@throws NullPointerException {@inheritDoc} | [
"Inserts",
"the",
"specified",
"element",
"at",
"the",
"tail",
"of",
"this",
"queue",
"waiting",
"for",
"space",
"to",
"become",
"available",
"if",
"the",
"queue",
"is",
"full",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java#L334-L345 |
34,279 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java | ArrayBlockingQueue.offer | public boolean offer(E e, long timeout, TimeUnit unit)
throws InterruptedException {
Objects.requireNonNull(e);
long nanos = unit.toNanos(timeout);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
while (count == items.length) {
... | java | public boolean offer(E e, long timeout, TimeUnit unit)
throws InterruptedException {
Objects.requireNonNull(e);
long nanos = unit.toNanos(timeout);
final ReentrantLock lock = this.lock;
lock.lockInterruptibly();
try {
while (count == items.length) {
... | [
"public",
"boolean",
"offer",
"(",
"E",
"e",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"Objects",
".",
"requireNonNull",
"(",
"e",
")",
";",
"long",
"nanos",
"=",
"unit",
".",
"toNanos",
"(",
"timeout",
... | Inserts the specified element at the tail of this queue, waiting
up to the specified wait time for space to become available if
the queue is full.
@throws InterruptedException {@inheritDoc}
@throws NullPointerException {@inheritDoc} | [
"Inserts",
"the",
"specified",
"element",
"at",
"the",
"tail",
"of",
"this",
"queue",
"waiting",
"up",
"to",
"the",
"specified",
"wait",
"time",
"for",
"space",
"to",
"become",
"available",
"if",
"the",
"queue",
"is",
"full",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ArrayBlockingQueue.java#L355-L373 |
34,280 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceTableAccess.java | ICUResourceTableAccess.getTableString | public static String getTableString(ICUResourceBundle bundle, String tableName,
String subtableName, String item, String defaultValue) {
String result = null;
try {
for (;;) {
ICUResourceBundle table = bundle.findWithFallback(tableName);
if (table ... | java | public static String getTableString(ICUResourceBundle bundle, String tableName,
String subtableName, String item, String defaultValue) {
String result = null;
try {
for (;;) {
ICUResourceBundle table = bundle.findWithFallback(tableName);
if (table ... | [
"public",
"static",
"String",
"getTableString",
"(",
"ICUResourceBundle",
"bundle",
",",
"String",
"tableName",
",",
"String",
"subtableName",
",",
"String",
"item",
",",
"String",
"defaultValue",
")",
"{",
"String",
"result",
"=",
"null",
";",
"try",
"{",
"fo... | Utility to fetch locale display data from resource bundle tables. Uses fallback
through the "Fallback" resource if available. | [
"Utility",
"to",
"fetch",
"locale",
"display",
"data",
"from",
"resource",
"bundle",
"tables",
".",
"Uses",
"fallback",
"through",
"the",
"Fallback",
"resource",
"if",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceTableAccess.java#L36-L97 |
34,281 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.charAt | public char charAt(int where) {
int len = length();
if (where < 0) {
throw new IndexOutOfBoundsException("charAt: " + where + " < 0");
} else if (where >= len) {
throw new IndexOutOfBoundsException("charAt: " + where + " >= length " + len);
}
if (where >=... | java | public char charAt(int where) {
int len = length();
if (where < 0) {
throw new IndexOutOfBoundsException("charAt: " + where + " < 0");
} else if (where >= len) {
throw new IndexOutOfBoundsException("charAt: " + where + " >= length " + len);
}
if (where >=... | [
"public",
"char",
"charAt",
"(",
"int",
"where",
")",
"{",
"int",
"len",
"=",
"length",
"(",
")",
";",
"if",
"(",
"where",
"<",
"0",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
"\"charAt: \"",
"+",
"where",
"+",
"\" < 0\"",
")",
";",
... | Return the char at the specified offset within the buffer. | [
"Return",
"the",
"char",
"at",
"the",
"specified",
"offset",
"within",
"the",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L107-L119 |
34,282 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.setSpan | public void setSpan(Object what, int start, int end, int flags) {
setSpan(true, what, start, end, flags);
} | java | public void setSpan(Object what, int start, int end, int flags) {
setSpan(true, what, start, end, flags);
} | [
"public",
"void",
"setSpan",
"(",
"Object",
"what",
",",
"int",
"start",
",",
"int",
"end",
",",
"int",
"flags",
")",
"{",
"setSpan",
"(",
"true",
",",
"what",
",",
"start",
",",
"end",
",",
"flags",
")",
";",
"}"
] | Mark the specified range of text with the specified object.
The flags determine how the span will behave when text is
inserted at the start or end of the span's range. | [
"Mark",
"the",
"specified",
"range",
"of",
"text",
"with",
"the",
"specified",
"object",
".",
"The",
"flags",
"determine",
"how",
"the",
"span",
"will",
"behave",
"when",
"text",
"is",
"inserted",
"at",
"the",
"start",
"or",
"end",
"of",
"the",
"span",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L585-L587 |
34,283 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.removeSpan | public void removeSpan(Object what) {
for (int i = mSpanCount - 1; i >= 0; i--) {
if (mSpans[i] == what) {
removeSpan(i);
return;
}
}
} | java | public void removeSpan(Object what) {
for (int i = mSpanCount - 1; i >= 0; i--) {
if (mSpans[i] == what) {
removeSpan(i);
return;
}
}
} | [
"public",
"void",
"removeSpan",
"(",
"Object",
"what",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"mSpanCount",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"if",
"(",
"mSpans",
"[",
"i",
"]",
"==",
"what",
")",
"{",
"removeSpan",
"(",
... | Remove the specified markup object from the buffer. | [
"Remove",
"the",
"specified",
"markup",
"object",
"from",
"the",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L692-L699 |
34,284 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.getSpanStart | public int getSpanStart(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
int where = mSpanStarts[i];
if (where > mGapStart)
where -= mGapLength;
... | java | public int getSpanStart(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
int where = mSpanStarts[i];
if (where > mGapStart)
where -= mGapLength;
... | [
"public",
"int",
"getSpanStart",
"(",
"Object",
"what",
")",
"{",
"int",
"count",
"=",
"mSpanCount",
";",
"Object",
"[",
"]",
"spans",
"=",
"mSpans",
";",
"for",
"(",
"int",
"i",
"=",
"count",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
... | Return the buffer offset of the beginning of the specified
markup object, or -1 if it is not attached to this buffer. | [
"Return",
"the",
"buffer",
"offset",
"of",
"the",
"beginning",
"of",
"the",
"specified",
"markup",
"object",
"or",
"-",
"1",
"if",
"it",
"is",
"not",
"attached",
"to",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L705-L721 |
34,285 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.getSpanEnd | public int getSpanEnd(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
int where = mSpanEnds[i];
if (where > mGapStart)
where -= mGapLength;
... | java | public int getSpanEnd(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
int where = mSpanEnds[i];
if (where > mGapStart)
where -= mGapLength;
... | [
"public",
"int",
"getSpanEnd",
"(",
"Object",
"what",
")",
"{",
"int",
"count",
"=",
"mSpanCount",
";",
"Object",
"[",
"]",
"spans",
"=",
"mSpans",
";",
"for",
"(",
"int",
"i",
"=",
"count",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"... | Return the buffer offset of the end of the specified
markup object, or -1 if it is not attached to this buffer. | [
"Return",
"the",
"buffer",
"offset",
"of",
"the",
"end",
"of",
"the",
"specified",
"markup",
"object",
"or",
"-",
"1",
"if",
"it",
"is",
"not",
"attached",
"to",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L727-L743 |
34,286 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.getSpanFlags | public int getSpanFlags(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
return mSpanFlags[i];
}
}
return 0;
} | java | public int getSpanFlags(Object what) {
int count = mSpanCount;
Object[] spans = mSpans;
for (int i = count - 1; i >= 0; i--) {
if (spans[i] == what) {
return mSpanFlags[i];
}
}
return 0;
} | [
"public",
"int",
"getSpanFlags",
"(",
"Object",
"what",
")",
"{",
"int",
"count",
"=",
"mSpanCount",
";",
"Object",
"[",
"]",
"spans",
"=",
"mSpans",
";",
"for",
"(",
"int",
"i",
"=",
"count",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
... | Return the flags of the end of the specified
markup object, or 0 if it is not attached to this buffer. | [
"Return",
"the",
"flags",
"of",
"the",
"end",
"of",
"the",
"specified",
"markup",
"object",
"or",
"0",
"if",
"it",
"is",
"not",
"attached",
"to",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L749-L760 |
34,287 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.getSpans | @SuppressWarnings("unchecked")
public <T> T[] getSpans(int queryStart, int queryEnd, Class<T> kind) {
if (kind == null) return ArrayUtils.emptyArray(kind);
int spanCount = mSpanCount;
Object[] spans = mSpans;
int[] starts = mSpanStarts;
int[] ends = mSpanEnds;
int[] ... | java | @SuppressWarnings("unchecked")
public <T> T[] getSpans(int queryStart, int queryEnd, Class<T> kind) {
if (kind == null) return ArrayUtils.emptyArray(kind);
int spanCount = mSpanCount;
Object[] spans = mSpans;
int[] starts = mSpanStarts;
int[] ends = mSpanEnds;
int[] ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"[",
"]",
"getSpans",
"(",
"int",
"queryStart",
",",
"int",
"queryEnd",
",",
"Class",
"<",
"T",
">",
"kind",
")",
"{",
"if",
"(",
"kind",
"==",
"null",
")",
"return",
... | Return an array of the spans of the specified type that overlap
the specified range of the buffer. The kind may be Object.class to get
a list of all the spans regardless of type. | [
"Return",
"an",
"array",
"of",
"the",
"spans",
"of",
"the",
"specified",
"type",
"that",
"overlap",
"the",
"specified",
"range",
"of",
"the",
"buffer",
".",
"The",
"kind",
"may",
"be",
"Object",
".",
"class",
"to",
"get",
"a",
"list",
"of",
"all",
"the... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L767-L861 |
34,288 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.getChars | public void getChars(int start, int end, char[] dest, int destoff) {
checkRange("getChars", start, end);
if (end <= mGapStart) {
System.arraycopy(mText, start, dest, destoff, end - start);
} else if (start >= mGapStart) {
System.arraycopy(mText, start + mGapLength, dest,... | java | public void getChars(int start, int end, char[] dest, int destoff) {
checkRange("getChars", start, end);
if (end <= mGapStart) {
System.arraycopy(mText, start, dest, destoff, end - start);
} else if (start >= mGapStart) {
System.arraycopy(mText, start + mGapLength, dest,... | [
"public",
"void",
"getChars",
"(",
"int",
"start",
",",
"int",
"end",
",",
"char",
"[",
"]",
"dest",
",",
"int",
"destoff",
")",
"{",
"checkRange",
"(",
"\"getChars\"",
",",
"start",
",",
"end",
")",
";",
"if",
"(",
"end",
"<=",
"mGapStart",
")",
"... | Copy the specified range of chars from this buffer into the
specified array, beginning at the specified offset. | [
"Copy",
"the",
"specified",
"range",
"of",
"chars",
"from",
"this",
"buffer",
"into",
"the",
"specified",
"array",
"beginning",
"at",
"the",
"specified",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L910-L923 |
34,289 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java | SpannableStringBuilder.substring | public String substring(int start, int end) {
char[] buf = new char[end - start];
getChars(start, end, buf, 0);
return new String(buf);
} | java | public String substring(int start, int end) {
char[] buf = new char[end - start];
getChars(start, end, buf, 0);
return new String(buf);
} | [
"public",
"String",
"substring",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"char",
"[",
"]",
"buf",
"=",
"new",
"char",
"[",
"end",
"-",
"start",
"]",
";",
"getChars",
"(",
"start",
",",
"end",
",",
"buf",
",",
"0",
")",
";",
"return",
... | Return a String containing a copy of the chars in this buffer, limited to the
[start, end[ range.
@hide | [
"Return",
"a",
"String",
"containing",
"a",
"copy",
"of",
"the",
"chars",
"in",
"this",
"buffer",
"limited",
"to",
"the",
"[",
"start",
"end",
"[",
"range",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L942-L946 |
34,290 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/cs/StreamEncoder.java | StreamEncoder.forOutputStreamWriter | public static StreamEncoder forOutputStreamWriter(OutputStream out,
Object lock,
String charsetName)
throws UnsupportedEncodingException
{
String csn = charsetName;
if (csn == null)
... | java | public static StreamEncoder forOutputStreamWriter(OutputStream out,
Object lock,
String charsetName)
throws UnsupportedEncodingException
{
String csn = charsetName;
if (csn == null)
... | [
"public",
"static",
"StreamEncoder",
"forOutputStreamWriter",
"(",
"OutputStream",
"out",
",",
"Object",
"lock",
",",
"String",
"charsetName",
")",
"throws",
"UnsupportedEncodingException",
"{",
"String",
"csn",
"=",
"charsetName",
";",
"if",
"(",
"csn",
"==",
"nu... | Factories for java.io.OutputStreamWriter | [
"Factories",
"for",
"java",
".",
"io",
".",
"OutputStreamWriter"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/cs/StreamEncoder.java#L49-L62 |
34,291 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/cs/StreamEncoder.java | StreamEncoder.forEncoder | public static StreamEncoder forEncoder(WritableByteChannel ch,
CharsetEncoder enc,
int minBufferCap)
{
return new StreamEncoder(ch, enc, minBufferCap);
} | java | public static StreamEncoder forEncoder(WritableByteChannel ch,
CharsetEncoder enc,
int minBufferCap)
{
return new StreamEncoder(ch, enc, minBufferCap);
} | [
"public",
"static",
"StreamEncoder",
"forEncoder",
"(",
"WritableByteChannel",
"ch",
",",
"CharsetEncoder",
"enc",
",",
"int",
"minBufferCap",
")",
"{",
"return",
"new",
"StreamEncoder",
"(",
"ch",
",",
"enc",
",",
"minBufferCap",
")",
";",
"}"
] | Factory for java.nio.channels.Channels.newWriter | [
"Factory",
"for",
"java",
".",
"nio",
".",
"channels",
".",
"Channels",
".",
"newWriter"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/cs/StreamEncoder.java#L81-L86 |
34,292 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/SocketChannel.java | SocketChannel.open | public static SocketChannel open(SocketAddress remote)
throws IOException
{
SocketChannel sc = open();
try {
sc.connect(remote);
} catch (Throwable x) {
try {
sc.close();
} catch (Throwable suppressed) {
x.addSuppres... | java | public static SocketChannel open(SocketAddress remote)
throws IOException
{
SocketChannel sc = open();
try {
sc.connect(remote);
} catch (Throwable x) {
try {
sc.close();
} catch (Throwable suppressed) {
x.addSuppres... | [
"public",
"static",
"SocketChannel",
"open",
"(",
"SocketAddress",
"remote",
")",
"throws",
"IOException",
"{",
"SocketChannel",
"sc",
"=",
"open",
"(",
")",
";",
"try",
"{",
"sc",
".",
"connect",
"(",
"remote",
")",
";",
"}",
"catch",
"(",
"Throwable",
... | Opens a socket channel and connects it to a remote address.
<p> This convenience method works as if by invoking the {@link #open()}
method, invoking the {@link #connect(SocketAddress) connect} method upon
the resulting socket channel, passing it <tt>remote</tt>, and then
returning that channel. </p>
@param remote
T... | [
"Opens",
"a",
"socket",
"channel",
"and",
"connects",
"it",
"to",
"a",
"remote",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/channels/SocketChannel.java#L184-L200 |
34,293 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java | ObjectOutputStream.removeUnsharedReference | private void removeUnsharedReference(Object obj, int previousHandle) {
if (previousHandle != -1) {
objectsWritten.put(obj, previousHandle);
} else {
objectsWritten.remove(obj);
}
} | java | private void removeUnsharedReference(Object obj, int previousHandle) {
if (previousHandle != -1) {
objectsWritten.put(obj, previousHandle);
} else {
objectsWritten.remove(obj);
}
} | [
"private",
"void",
"removeUnsharedReference",
"(",
"Object",
"obj",
",",
"int",
"previousHandle",
")",
"{",
"if",
"(",
"previousHandle",
"!=",
"-",
"1",
")",
"{",
"objectsWritten",
".",
"put",
"(",
"obj",
",",
"previousHandle",
")",
";",
"}",
"else",
"{",
... | Remove the unshared object from the table, and restore any previous
handle.
@param obj
Non-null object being dumped.
@param previousHandle
The handle of the previous identical object dumped | [
"Remove",
"the",
"unshared",
"object",
"from",
"the",
"table",
"and",
"restore",
"any",
"previous",
"handle",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java#L506-L512 |
34,294 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java | ObjectOutputStream.useProtocolVersion | public void useProtocolVersion(int version) throws IOException {
if (!objectsWritten.isEmpty()) {
throw new IllegalStateException("Cannot set protocol version when stream in use");
}
if (version != ObjectStreamConstants.PROTOCOL_VERSION_1
&& version != ObjectStreamCon... | java | public void useProtocolVersion(int version) throws IOException {
if (!objectsWritten.isEmpty()) {
throw new IllegalStateException("Cannot set protocol version when stream in use");
}
if (version != ObjectStreamConstants.PROTOCOL_VERSION_1
&& version != ObjectStreamCon... | [
"public",
"void",
"useProtocolVersion",
"(",
"int",
"version",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"objectsWritten",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cannot set protocol version when stream in use\"",
... | Sets the specified protocol version to be used by this stream.
@param version
the protocol version to be used. Use a {@code
PROTOCOL_VERSION_x} constant from {@code
java.io.ObjectStreamConstants}.
@throws IllegalArgumentException
if an invalid {@code version} is specified.
@throws IOException
if an I/O error occurs.
@... | [
"Sets",
"the",
"specified",
"protocol",
"version",
"to",
"be",
"used",
"by",
"this",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java#L594-L603 |
34,295 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java | ObjectOutputStream.writeEnumDesc | private ObjectStreamClass writeEnumDesc(ObjectStreamClass classDesc, boolean unshared)
throws IOException {
// write classDesc, classDesc for enum is different
// set flag for enum, the flag is (SC_SERIALIZABLE | SC_ENUM)
classDesc.setFlags((byte) (SC_SERIALIZABLE | SC_ENUM));
... | java | private ObjectStreamClass writeEnumDesc(ObjectStreamClass classDesc, boolean unshared)
throws IOException {
// write classDesc, classDesc for enum is different
// set flag for enum, the flag is (SC_SERIALIZABLE | SC_ENUM)
classDesc.setFlags((byte) (SC_SERIALIZABLE | SC_ENUM));
... | [
"private",
"ObjectStreamClass",
"writeEnumDesc",
"(",
"ObjectStreamClass",
"classDesc",
",",
"boolean",
"unshared",
")",
"throws",
"IOException",
"{",
"// write classDesc, classDesc for enum is different",
"// set flag for enum, the flag is (SC_SERIALIZABLE | SC_ENUM)",
"classDesc",
... | write for Enum Class Desc only, which is different from other classes | [
"write",
"for",
"Enum",
"Class",
"Desc",
"only",
"which",
"is",
"different",
"from",
"other",
"classes"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectOutputStream.java#L1656-L1705 |
34,296 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacterNameIterator.java | UCharacterNameIterator.iterateExtended | private boolean iterateExtended(ValueIterator.Element result,
int limit)
{
while (m_current_ < limit) {
String name = m_name_.getExtendedOr10Name(m_current_);
if (name != null && name.length() > 0) {
result.integer = m_current_;
... | java | private boolean iterateExtended(ValueIterator.Element result,
int limit)
{
while (m_current_ < limit) {
String name = m_name_.getExtendedOr10Name(m_current_);
if (name != null && name.length() > 0) {
result.integer = m_current_;
... | [
"private",
"boolean",
"iterateExtended",
"(",
"ValueIterator",
".",
"Element",
"result",
",",
"int",
"limit",
")",
"{",
"while",
"(",
"m_current_",
"<",
"limit",
")",
"{",
"String",
"name",
"=",
"m_name_",
".",
"getExtendedOr10Name",
"(",
"m_current_",
")",
... | Iterate extended names.
@param result stores the result codepoint and name
@param limit last codepoint + 1 in range to search
@return false if a codepoint with a name is found and we can
bail from further iteration, true to continue on with the
iteration (this will always be false for valid codepoints) | [
"Iterate",
"extended",
"names",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UCharacterNameIterator.java#L327-L340 |
34,297 | google/j2objc | jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/Introspector.java | Introspector.getBeanInfoSearchPath | public static String[] getBeanInfoSearchPath() {
String[] path = new String[searchPath.length];
System.arraycopy(searchPath, 0, path, 0, searchPath.length);
return path;
} | java | public static String[] getBeanInfoSearchPath() {
String[] path = new String[searchPath.length];
System.arraycopy(searchPath, 0, path, 0, searchPath.length);
return path;
} | [
"public",
"static",
"String",
"[",
"]",
"getBeanInfoSearchPath",
"(",
")",
"{",
"String",
"[",
"]",
"path",
"=",
"new",
"String",
"[",
"searchPath",
".",
"length",
"]",
";",
"System",
".",
"arraycopy",
"(",
"searchPath",
",",
"0",
",",
"path",
",",
"0"... | Gets an array of search packages.
@return an array of search packages. | [
"Gets",
"an",
"array",
"of",
"search",
"packages",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/Introspector.java#L238-L242 |
34,298 | google/j2objc | jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/Introspector.java | Introspector.setBeanInfoSearchPath | public static void setBeanInfoSearchPath(String[] path) {
if (System.getSecurityManager() != null) {
System.getSecurityManager().checkPropertiesAccess();
}
searchPath = path;
} | java | public static void setBeanInfoSearchPath(String[] path) {
if (System.getSecurityManager() != null) {
System.getSecurityManager().checkPropertiesAccess();
}
searchPath = path;
} | [
"public",
"static",
"void",
"setBeanInfoSearchPath",
"(",
"String",
"[",
"]",
"path",
")",
"{",
"if",
"(",
"System",
".",
"getSecurityManager",
"(",
")",
"!=",
"null",
")",
"{",
"System",
".",
"getSecurityManager",
"(",
")",
".",
"checkPropertiesAccess",
"("... | Sets the search packages.
@param path the new search packages to be set. | [
"Sets",
"the",
"search",
"packages",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/Introspector.java#L249-L254 |
34,299 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicLongFieldUpdater.java | AtomicLongFieldUpdater.getAndSet | public long getAndSet(T obj, long newValue) {
long prev;
do {
prev = get(obj);
} while (!compareAndSet(obj, prev, newValue));
return prev;
} | java | public long getAndSet(T obj, long newValue) {
long prev;
do {
prev = get(obj);
} while (!compareAndSet(obj, prev, newValue));
return prev;
} | [
"public",
"long",
"getAndSet",
"(",
"T",
"obj",
",",
"long",
"newValue",
")",
"{",
"long",
"prev",
";",
"do",
"{",
"prev",
"=",
"get",
"(",
"obj",
")",
";",
"}",
"while",
"(",
"!",
"compareAndSet",
"(",
"obj",
",",
"prev",
",",
"newValue",
")",
"... | Atomically sets the field of the given object managed by this updater
to the given value and returns the old value.
@param obj An object whose field to get and set
@param newValue the new value
@return the previous value | [
"Atomically",
"sets",
"the",
"field",
"of",
"the",
"given",
"object",
"managed",
"by",
"this",
"updater",
"to",
"the",
"given",
"value",
"and",
"returns",
"the",
"old",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicLongFieldUpdater.java#L168-L174 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.