/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/ |
D | Headers.java | 49 private final String[] namesAndValues; field in Headers 52 this.namesAndValues = builder.namesAndValues.toArray(new String[builder.namesAndValues.size()]); in Headers() 55 private Headers(String[] namesAndValues) { in Headers() argument 56 this.namesAndValues = namesAndValues; in Headers() 61 return get(namesAndValues, name); in get() 76 return namesAndValues.length / 2; in size() 82 if (nameIndex < 0 || nameIndex >= namesAndValues.length) { in name() 85 return namesAndValues[nameIndex]; in name() 91 if (valueIndex < 0 || valueIndex >= namesAndValues.length) { in value() 94 return namesAndValues[valueIndex]; in value() [all …]
|
D | HttpUrl.java | 481 static void namesAndValuesToQueryString(StringBuilder out, List<String> namesAndValues) { in namesAndValuesToQueryString() argument 482 for (int i = 0, size = namesAndValues.size(); i < size; i += 2) { in namesAndValuesToQueryString() 483 String name = namesAndValues.get(i); in namesAndValuesToQueryString() 484 String value = namesAndValues.get(i + 1); in namesAndValuesToQueryString()
|
/external/okhttp/repackaged/okhttp/src/main/java/com/android/okhttp/ |
D | Headers.java | 51 private final String[] namesAndValues; field in Headers 54 this.namesAndValues = builder.namesAndValues.toArray(new String[builder.namesAndValues.size()]); in Headers() 57 private Headers(String[] namesAndValues) { in Headers() argument 58 this.namesAndValues = namesAndValues; in Headers() 63 return get(namesAndValues, name); in get() 78 return namesAndValues.length / 2; in size() 84 if (nameIndex < 0 || nameIndex >= namesAndValues.length) { in name() 87 return namesAndValues[nameIndex]; in name() 93 if (valueIndex < 0 || valueIndex >= namesAndValues.length) { in value() 96 return namesAndValues[valueIndex]; in value() [all …]
|
D | HttpUrl.java | 484 static void namesAndValuesToQueryString(StringBuilder out, List<String> namesAndValues) { in namesAndValuesToQueryString() argument 485 for (int i = 0, size = namesAndValues.size(); i < size; i += 2) { in namesAndValuesToQueryString() 486 String name = namesAndValues.get(i); in namesAndValuesToQueryString() 487 String value = namesAndValues.get(i + 1); in namesAndValuesToQueryString()
|
/external/grpc-grpc-java/netty/src/main/java/io/grpc/netty/ |
D | GrpcHttp2HeadersUtils.java | 94 private byte[][] namesAndValues; field in GrpcHttp2HeadersUtils.GrpcHttp2InboundHeaders 100 namesAndValues = new byte[numHeadersGuess * 2][]; in GrpcHttp2InboundHeaders() 105 if (namesAndValuesIdx == namesAndValues.length) { in add() 111 namesAndValues[namesAndValuesIdx] = nameBytes; in add() 113 namesAndValues[namesAndValuesIdx] = valueBytes; in add() 120 if (equals(name, namesAndValues[i])) { in get() 137 if (equals(name, namesAndValues[i])) { in getAll() 154 byte[][] namesAndValues() { in namesAndValues() method in GrpcHttp2HeadersUtils.GrpcHttp2InboundHeaders 155 return namesAndValues; in namesAndValues() 223 System.arraycopy(namesAndValues, 0, newNamesAndValues, 0, namesAndValues.length); in expandHeadersAndValues() [all …]
|
D | Utils.java | 81 return InternalMetadata.newMetadata(h.numHeaders(), h.namesAndValues()); in convertHeaders() 144 return InternalMetadata.newMetadata(h.numHeaders(), h.namesAndValues()); in convertTrailers()
|
/external/grpc-grpc-java/core/src/main/java/io/grpc/ |
D | Metadata.java | 124 namesAndValues = binaryValues; in Metadata() 127 private byte[][] namesAndValues; field in Metadata 132 return namesAndValues[i * 2]; in name() 136 namesAndValues[i * 2] = name; in name() 140 return namesAndValues[i * 2 + 1]; in value() 144 namesAndValues[i * 2 + 1] = value; in value() 148 return namesAndValues != null ? namesAndValues.length : 0; in cap() 303 System.arraycopy(namesAndValues, 0, newNamesAndValues, 0, len()); in expand() 305 namesAndValues = newNamesAndValues; in expand() 331 System.arraycopy(namesAndValues, readIdx, namesAndValues, writeIdx, readLen); in remove() [all …]
|
/external/grpc-grpc-java/netty/src/test/java/io/grpc/netty/ |
D | GrpcHttp2InboundHeadersTest.java | 75 byte[][] namesAndValues = ((GrpcHttp2InboundHeaders)headers).namesAndValues(); in binaryHeadersShouldBeBase64Decoded() 77 assertEquals(of("foo-bin"), new AsciiString(namesAndValues[0])); in binaryHeadersShouldBeBase64Decoded() 78 assertNotSame(data, namesAndValues[1]); in binaryHeadersShouldBeBase64Decoded() 79 assertArrayEquals(data, namesAndValues[1]); in binaryHeadersShouldBeBase64Decoded()
|
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/ |
D | HeadersTest.java | 216 String[] namesAndValues = { in ofMakesDefensiveCopy() local 220 Headers headers = Headers.of(namesAndValues); in ofMakesDefensiveCopy() 221 namesAndValues[1] = "Chrome"; in ofMakesDefensiveCopy() 273 Map<String, String> namesAndValues = new HashMap<>(); in ofMapMakesDefensiveCopy() local 274 namesAndValues.put("User-Agent", "OkHttp"); in ofMapMakesDefensiveCopy() 276 Headers headers = Headers.of(namesAndValues); in ofMapMakesDefensiveCopy() 277 namesAndValues.put("User-Agent", "Chrome"); in ofMapMakesDefensiveCopy()
|
/external/conscrypt/testing/src/main/java/tests/util/ |
D | ForEachRunner.java | 39 public static <T> void runNamed(Callback<T> callback, Iterable<Pair<String, T>> namesAndValues) in runNamed() argument 41 for (Pair<String, T> nameAndValue : namesAndValues) { in runNamed()
|
/external/conscrypt/repackaged/testing/src/main/java/tests/util/ |
D | ForEachRunner.java | 42 public static <T> void runNamed(Callback<T> callback, Iterable<Pair<String, T>> namesAndValues) in runNamed() argument 44 for (Pair<String, T> nameAndValue : namesAndValues) { in runNamed()
|