Home
last modified time | relevance | path

Searched refs:fromBytes (Results 1 – 25 of 87) sorted by relevance

1234

/external/opencensus-java/api/src/test/java/io/opencensus/trace/
DSpanContextTest.java39 TraceId.fromBytes(firstTraceIdBytes),
40 SpanId.fromBytes(firstSpanIdBytes),
45 TraceId.fromBytes(secondTraceIdBytes),
46 SpanId.fromBytes(secondSpanIdBytes),
62 TraceId.fromBytes(firstTraceIdBytes), SpanId.INVALID, TraceOptions.DEFAULT) in isValid()
67 TraceId.INVALID, SpanId.fromBytes(firstSpanIdBytes), TraceOptions.DEFAULT) in isValid()
76 assertThat(first.getTraceId()).isEqualTo(TraceId.fromBytes(firstTraceIdBytes)); in getTraceId()
77 assertThat(second.getTraceId()).isEqualTo(TraceId.fromBytes(secondTraceIdBytes)); in getTraceId()
82 assertThat(first.getSpanId()).isEqualTo(SpanId.fromBytes(firstSpanIdBytes)); in getSpanId()
83 assertThat(second.getSpanId()).isEqualTo(SpanId.fromBytes(secondSpanIdBytes)); in getSpanId()
[all …]
DTraceIdTest.java34 private static final TraceId first = TraceId.fromBytes(firstBytes);
35 private static final TraceId second = TraceId.fromBytes(secondBytes);
74 assertThat(first.compareTo(TraceId.fromBytes(firstBytes))).isEqualTo(0); in traceId_CompareTo()
81 tester.addEqualityGroup(first, TraceId.fromBytes(Arrays.copyOf(firstBytes, firstBytes.length))); in traceId_EqualsAndHashCode()
83 second, TraceId.fromBytes(Arrays.copyOf(secondBytes, secondBytes.length))); in traceId_EqualsAndHashCode()
DSpanIdTest.java32 private static final SpanId first = SpanId.fromBytes(firstBytes);
33 private static final SpanId second = SpanId.fromBytes(secondBytes);
71 assertThat(first.compareTo(SpanId.fromBytes(firstBytes))).isEqualTo(0); in traceId_CompareTo()
78 tester.addEqualityGroup(first, SpanId.fromBytes(Arrays.copyOf(firstBytes, firstBytes.length))); in traceId_EqualsAndHashCode()
80 second, SpanId.fromBytes(Arrays.copyOf(secondBytes, secondBytes.length))); in traceId_EqualsAndHashCode()
DTraceOptionsTest.java61 assertThat(TraceOptions.fromBytes(new byte[] {FIRST_BYTE}).getByte()).isEqualTo(FIRST_BYTE); in deprecated_fromBytes()
62 assertThat(TraceOptions.fromBytes(new byte[] {1, FIRST_BYTE}, 1).getByte()) in deprecated_fromBytes()
/external/guava/android/guava-tests/test/com/google/common/hash/
DHashCodeTest.java98 HashCode fromBytes = HashCode.fromBytes(expected.bytes); in testFromBytes() local
99 assertExpectedHashCode(expected, fromBytes); in testFromBytes()
105 HashCode hashCode = HashCode.fromBytes(bytes); in testFromBytes_copyOccurs()
133 HashCode hashCode = HashCode.fromBytes(bytes); in testGetBytesInternal_noCloneOccurs()
171 assertEquals("7f8005ff0e", HashCode.fromBytes(data).toString()); in testToString()
185 HashCode hash2 = HashCode.fromBytes(BaseEncoding.base16().lowerCase().decode(hash1.toString())); in testRoundTripHashCodeUsingBaseEncoding()
204 HashCode hashCodeA = HashCode.fromBytes(bytesA); in testObjectHashCodeWithSameLowOrderBytes()
205 HashCode hashCodeB = HashCode.fromBytes(bytesB); in testObjectHashCodeWithSameLowOrderBytes()
223 String string = HashCode.fromBytes(expected.bytes).toString(); in testRoundTrip()
227 HashCode.fromBytes(BaseEncoding.base16().lowerCase().decode(string)).toString()); in testRoundTrip()
[all …]
DMacHashFunctionTest.java100 HashCode.fromBytes(mac.doFinal()), in testMultipleUpdates()
115 HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))), in testMultipleUpdatesDoFinal()
181 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs()
190 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs_mixedAlgorithms()
201 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs()
202 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs()
214 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs_mixedAlgorithms()
215 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs_mixedAlgorithms()
283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing()
284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing()
DMessageDigestHashFunctionTest.java101 HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input)); in assertMessageDigestHashing()
104 HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)), in assertMessageDigestHashing()
DAbstractNonStreamingHashFunctionTest.java107 return HashCode.fromBytes(out.toByteArray()); in newHasher()
135 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); in hashBytes()
/external/guava/guava-tests/test/com/google/common/hash/
DHashCodeTest.java98 HashCode fromBytes = HashCode.fromBytes(expected.bytes); in testFromBytes() local
99 assertExpectedHashCode(expected, fromBytes); in testFromBytes()
105 HashCode hashCode = HashCode.fromBytes(bytes); in testFromBytes_copyOccurs()
133 HashCode hashCode = HashCode.fromBytes(bytes); in testGetBytesInternal_noCloneOccurs()
171 assertEquals("7f8005ff0e", HashCode.fromBytes(data).toString()); in testToString()
185 HashCode hash2 = HashCode.fromBytes(BaseEncoding.base16().lowerCase().decode(hash1.toString())); in testRoundTripHashCodeUsingBaseEncoding()
204 HashCode hashCodeA = HashCode.fromBytes(bytesA); in testObjectHashCodeWithSameLowOrderBytes()
205 HashCode hashCodeB = HashCode.fromBytes(bytesB); in testObjectHashCodeWithSameLowOrderBytes()
223 String string = HashCode.fromBytes(expected.bytes).toString(); in testRoundTrip()
227 HashCode.fromBytes(BaseEncoding.base16().lowerCase().decode(string)).toString()); in testRoundTrip()
[all …]
DMacHashFunctionTest.java100 HashCode.fromBytes(mac.doFinal()), in testMultipleUpdates()
115 HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))), in testMultipleUpdatesDoFinal()
181 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs()
190 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs_mixedAlgorithms()
201 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs()
202 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs()
214 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs_mixedAlgorithms()
215 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs_mixedAlgorithms()
283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing()
284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing()
DMessageDigestHashFunctionTest.java101 HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input)); in assertMessageDigestHashing()
104 HashCode.fromBytes(Arrays.copyOf(digest.digest(input), bytes)), in assertMessageDigestHashing()
DAbstractNonStreamingHashFunctionTest.java107 return HashCode.fromBytes(out.toByteArray()); in newHasher()
135 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); in hashBytes()
/external/opencensus-java/exporters/trace/jaeger/src/test/java/io/opencensus/exporter/trace/jaeger/
DJaegerExporterHandlerTest.java72 SpanId.fromBytes(new byte[] {(byte) 0x7F, FF, FF, FF, FF, FF, FF, FF}), in exportShouldConvertFromSpanDataToJaegerThriftSpan()
132 TraceId.fromBytes(new byte[] {FF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}), in sampleSpanContext()
133 SpanId.fromBytes(new byte[] {0, 0, 0, 0, 0, 0, 1, 0}), in sampleSpanContext()
169 TraceId.fromBytes( in sampleLinks()
171 SpanId.fromBytes(new byte[] {0, 0, 0, 0, 0, 0, 2, 0}), in sampleLinks()
/external/guava/android/guava/src/com/google/common/io/
DLittleEndianDataInputStream.java101 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1); in readUnsignedShort()
120 return Ints.fromBytes(b4, b3, b2, b1); in readInt()
143 return Longs.fromBytes(b8, b7, b6, b5, b4, b3, b2, b1); in readLong()
/external/guava/guava/src/com/google/common/io/
DLittleEndianDataInputStream.java101 return Ints.fromBytes((byte) 0, (byte) 0, b2, b1); in readUnsignedShort()
120 return Ints.fromBytes(b4, b3, b2, b1); in readInt()
143 return Longs.fromBytes(b8, b7, b6, b5, b4, b3, b2, b1); in readLong()
/external/flatbuffers/dart/test/
Dflat_buffers_test.dart205 BufferContext buffer = new BufferContext.fromBytes(byteList);
267 BufferContext buf = new BufferContext.fromBytes(byteList);
292 BufferContext buf = new BufferContext.fromBytes(byteList);
320 BufferContext buf = new BufferContext.fromBytes(byteList);
340 BufferContext buf = new BufferContext.fromBytes(byteList);
376 BufferContext buf = new BufferContext.fromBytes(byteList);
393 BufferContext buf = new BufferContext.fromBytes(byteList);
412 BufferContext buf = new BufferContext.fromBytes(byteList);
445 BufferContext buf = new BufferContext.fromBytes(byteList);
465 BufferContext buf = new BufferContext.fromBytes(byteList);
[all …]
/external/opencensus-java/api/src/main/java/io/opencensus/trace/
DTraceOptions.java78 public static TraceOptions fromBytes(byte[] buffer) { in fromBytes() method in TraceOptions
100 public static TraceOptions fromBytes(byte[] src, int srcOffset) { in fromBytes() method in TraceOptions
DSpanId.java71 public static SpanId fromBytes(byte[] buffer) { in fromBytes() method in SpanId
92 public static SpanId fromBytes(byte[] src, int srcOffset) { in fromBytes() method in SpanId
DTraceId.java72 public static TraceId fromBytes(byte[] buffer) { in fromBytes() method in TraceId
93 public static TraceId fromBytes(byte[] src, int srcOffset) { in fromBytes() method in TraceId
/external/opencensus-java/contrib/appengine_standard_util/src/main/java/io/opencensus/contrib/appengine/standard/util/
DAppEngineCloudTraceContextUtils.java67 TraceId.fromBytes(traceIdBuf.array()), in fromCloudTraceContext()
68 SpanId.fromBytes(spanIdBuf.array()), in fromCloudTraceContext()
/external/opencensus-java/contrib/spring_sleuth_v1x/src/main/java/io/opencensus/contrib/spring/sleuth/v1x/
DOpenCensusSleuthSpan.java71 TraceId.fromBytes( in fromSleuthSpan()
76 SpanId.fromBytes(ByteBuffer.allocate(SpanId.SIZE).putLong(span.getSpanId()).array()), in fromSleuthSpan()
/external/opencensus-java/impl_core/src/main/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImpl.java124 traceId = TraceId.fromBytes(bytes, pos + ID_SIZE); in fromByteArray()
131 spanId = SpanId.fromBytes(bytes, pos + ID_SIZE); in fromByteArray()
/external/cldr/tools/java/org/unicode/cldr/util/
DDictionaryStringByteConverter.java110 public Appendable fromBytes(byte[] input, int byteStart, int byteLength, Appendable result) { in fromBytes() method in DictionaryStringByteConverter
113 byteMaker.fromBytes(input, byteStart, byteLength, internal); in fromBytes()
DStringByteConverter.java74 public abstract Appendable fromBytes(byte[] input, int byteStart, in fromBytes() method in StringByteConverter
/external/opencensus-java/impl_core/src/test/java/io/opencensus/implcore/trace/propagation/
DBinaryFormatImplTest.java39 private static final TraceId TRACE_ID = TraceId.fromBytes(TRACE_ID_BYTES);
41 private static final SpanId SPAN_ID = SpanId.fromBytes(SPAN_ID_BYTES);

1234