Home
last modified time | relevance | path

Searched refs:byteArray (Results 1 – 25 of 81) sorted by relevance

1234

/external/exoplayer/tree/library/common/src/test/java/com/google/android/exoplayer2/util/
DParsableByteArrayTest.java299 ParsableByteArray byteArray = new ParsableByteArray(new byte[] { in readLittleEndianLong() local
303 assertThat(byteArray.readLittleEndianLong()).isEqualTo(0xFF00000000000001L); in readLittleEndianLong()
304 assertThat(byteArray.getPosition()).isEqualTo(8); in readLittleEndianLong()
309 ParsableByteArray byteArray = new ParsableByteArray(new byte[] { in readLittleEndianUnsignedInt() local
312 assertThat(byteArray.readLittleEndianUnsignedInt()).isEqualTo(0xFF000010L); in readLittleEndianUnsignedInt()
313 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianUnsignedInt()
318 ParsableByteArray byteArray = new ParsableByteArray(new byte[] { in readLittleEndianInt() local
321 assertThat(byteArray.readLittleEndianInt()).isEqualTo(0xFF000001); in readLittleEndianInt()
322 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianInt()
328 ParsableByteArray byteArray = new ParsableByteArray(data); in readLittleEndianUnsignedInt24() local
[all …]
/external/sl4a/Utils/src/com/googlecode/android_scripting/
DConvertUtils.java35 byte[] byteArray = new byte[parseString.length]; in convertStringToByteArray()
36 if (byteArray.length > 0) { in convertStringToByteArray()
41 byteArray[i] = (byte)val; in convertStringToByteArray()
44 return byteArray; in convertStringToByteArray()
53 public static String convertByteArrayToString(byte[] byteArray) { in convertByteArrayToString() argument
55 if (byteArray != null) { in convertByteArrayToString()
56 for (int i = 0; i < byteArray.length; i++) { in convertByteArrayToString()
57 if ((i + 1) != byteArray.length) { in convertByteArrayToString()
58 ret = ret + Integer.valueOf((byteArray[i]&0xFF)) + ","; in convertByteArrayToString()
61 ret = ret + Integer.valueOf((byteArray[i]&0xFF)); in convertByteArrayToString()
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/common/src/test/java/com/google/android/exoplayer2/util/
DParsableByteArrayTest.java331 ParsableByteArray byteArray = in readLittleEndianLong() local
333 assertThat(byteArray.readLittleEndianLong()).isEqualTo(0xFF00000000000001L); in readLittleEndianLong()
334 assertThat(byteArray.getPosition()).isEqualTo(8); in readLittleEndianLong()
339 ParsableByteArray byteArray = new ParsableByteArray(new byte[] {0x10, 0x00, 0x00, (byte) 0xFF}); in readLittleEndianUnsignedInt() local
340 assertThat(byteArray.readLittleEndianUnsignedInt()).isEqualTo(0xFF000010L); in readLittleEndianUnsignedInt()
341 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianUnsignedInt()
346 ParsableByteArray byteArray = new ParsableByteArray(new byte[] {0x01, 0x00, 0x00, (byte) 0xFF}); in readLittleEndianInt() local
347 assertThat(byteArray.readLittleEndianInt()).isEqualTo(0xFF000001); in readLittleEndianInt()
348 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianInt()
354 ParsableByteArray byteArray = new ParsableByteArray(data); in readLittleEndianUnsignedInt24() local
[all …]
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/common/src/test/java/com/google/android/exoplayer2/util/
DParsableByteArrayTest.java331 ParsableByteArray byteArray = in readLittleEndianLong() local
333 assertThat(byteArray.readLittleEndianLong()).isEqualTo(0xFF00000000000001L); in readLittleEndianLong()
334 assertThat(byteArray.getPosition()).isEqualTo(8); in readLittleEndianLong()
339 ParsableByteArray byteArray = new ParsableByteArray(new byte[] {0x10, 0x00, 0x00, (byte) 0xFF}); in readLittleEndianUnsignedInt() local
340 assertThat(byteArray.readLittleEndianUnsignedInt()).isEqualTo(0xFF000010L); in readLittleEndianUnsignedInt()
341 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianUnsignedInt()
346 ParsableByteArray byteArray = new ParsableByteArray(new byte[] {0x01, 0x00, 0x00, (byte) 0xFF}); in readLittleEndianInt() local
347 assertThat(byteArray.readLittleEndianInt()).isEqualTo(0xFF000001); in readLittleEndianInt()
348 assertThat(byteArray.getPosition()).isEqualTo(4); in readLittleEndianInt()
354 ParsableByteArray byteArray = new ParsableByteArray(data); in readLittleEndianUnsignedInt24() local
[all …]
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/utils/
DChecksumVerifyingInputStreamTest.java43 byte[] byteArray = new byte[3]; in testReadTakingByteArrayThrowsIOException()
44 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testReadTakingByteArrayThrowsIOException()
47 checksumVerifyingInputStream.read(byteArray); in testReadTakingByteArrayThrowsIOException()
56 byte[] byteArray = new byte[9]; in testReadTakingNoArgumentsThrowsIOException()
57 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testReadTakingNoArgumentsThrowsIOException()
69 byte[] byteArray = new byte[4]; in testSkip()
70 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testSkip()
72 int intOne = checksumVerifyingInputStream.read(byteArray); in testSkip()
79 assertArrayEquals(new byte[] {(byte)0, (byte)0, (byte)0, (byte)0}, byteArray); in testSkip()
DChecksumCalculatingInputStreamTest.java43 byte[] byteArray = new byte[0]; in testSkipReturningZero()
44 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testSkipReturningZero()
60 byte[] byteArray = new byte[6]; in testSkipReturningPositive()
61 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testSkipReturningPositive()
76 byte[] byteArray = new byte[6]; in testReadTakingNoArguments()
77 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testReadTakingNoArguments()
80 int inputStreamReadResult = bufferedInputStream.read(byteArray, 0, 1); in testReadTakingNoArguments()
97 byte[] byteArray = new byte[6]; in testReadTakingByteArray()
98 ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArray); in testReadTakingByteArray()
100 int readResult = checksumCalculatingInputStream.read(byteArray); in testReadTakingByteArray()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/
DArchiveUtilsTest.java102 byte[] byteArray = new byte[8]; in testIsEqualWithNullWithPositive()
103 byteArray[1] = (byte) (-77); in testIsEqualWithNullWithPositive()
105 … assertFalse(ArchiveUtils.isEqualWithNull(byteArray, 0, (byte)0, byteArray, (byte)0, (byte)80)); in testIsEqualWithNullWithPositive()
112 byte[] byteArray = ArchiveUtils.toAsciiBytes("SOCKET"); in testToAsciiBytes()
114 …ertArrayEquals(new byte[] {(byte)83, (byte)79, (byte)67, (byte)75, (byte)69, (byte)84}, byteArray); in testToAsciiBytes()
116 assertFalse(ArchiveUtils.isEqualWithNull(byteArray, 0, 46, byteArray, 63, 0)); in testToAsciiBytes()
140 byte[] byteArray = new byte[3]; in testToAsciiStringThrowsStringIndexOutOfBoundsException()
142 ArchiveUtils.toAsciiString(byteArray, 940, 2730); in testToAsciiStringThrowsStringIndexOutOfBoundsException()
/external/mdnsresponder/mDNSWindows/DLLX/
DDNSSDRecord.cpp40 std::vector< BYTE > byteArray; in Update() local
54 ok = VariantToByteArray( &rdata, byteArray ); in Update()
60 …bject->GetSubordRef(), m_rref, flags, ( uint16_t ) byteArray.size(), byteArray.size() > 0 ? &byteA… in Update()
DDNSSDService.cpp750 std::vector< BYTE > byteArray; in RegisterRecord() local
782 ok = VariantToByteArray( &rdata, byteArray ); in RegisterRecord()
812 …ullNameUTF8.c_str(), rrtype, rrclass, ( uint16_t ) byteArray.size(), byteArray.size() > 0 ? &byteA… in RegisterRecord()
860 std::vector< BYTE > byteArray; in AddRecord() local
884 ok = VariantToByteArray( &rdata, byteArray ); in AddRecord()
914 …ord( m_primary, &rref, flags, rrtype, ( uint16_t ) byteArray.size(), byteArray.size() > 0 ? &byteA… in AddRecord()
956 std::vector< BYTE > byteArray; in ReconfirmRecord() local
978 ok = VariantToByteArray( &rdata, byteArray ); in ReconfirmRecord()
984 …ullNameUTF8.c_str(), rrtype, rrclass, ( uint16_t ) byteArray.size(), byteArray.size() > 0 ? &byteA… in ReconfirmRecord()
1008 std::vector< BYTE > byteArray; in GetProperty() local
[all …]
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/ar/
DArArchiveInputStream.java208 private long asLong(final byte[] byteArray, int offset, int len) { in asLong() argument
209 return Long.parseLong(ArchiveUtils.toAsciiString(byteArray, offset, len).trim()); in asLong()
212 private int asInt(final byte[] byteArray, int offset, int len) { in asInt() argument
213 return asInt(byteArray, offset, len, 10, false); in asInt()
216 private int asInt(final byte[] byteArray, int offset, int len, final boolean treatBlankAsZero) { in asInt() argument
217 return asInt(byteArray, offset, len, 10, treatBlankAsZero); in asInt()
220 private int asInt(final byte[] byteArray, int offset, int len, final int base) { in asInt() argument
221 return asInt(byteArray, offset, len, base, false); in asInt()
224 …private int asInt(final byte[] byteArray, int offset, int len, final int base, final boolean treat… in asInt() argument
225 final String string = ArchiveUtils.toAsciiString(byteArray, offset, len).trim(); in asInt()
/external/harfbuzz_ng/src/
Dhb-ot-cff-common.hh117 const byte_str_array_t &byteArray) in serialize()
120 if (byteArray.length == 0) in serialize()
130 this->count = byteArray.length; in serialize()
132 if (unlikely (!c->allocate_size<HBUINT8> (offSize_ * (byteArray.length + 1)))) in serialize()
138 for (; i < byteArray.length; i++) in serialize()
141 offset += byteArray[i].get_size (); in serialize()
146 for (unsigned int i = 0; i < byteArray.length; i++) in serialize()
148 const byte_str_t &bs = byteArray[i]; in serialize()
161 byte_str_array_t byteArray; in serialize() local
162 byteArray.init (); in serialize()
[all …]
/external/okio/okio/src/jvmTest/java/okio/
DMessageDigestConsistencyTest.kt75 val byteArray = ByteArray(size).also { random.nextBytes(it) } in test() constant
80 input = byteArray, in test()
86 source = byteArray, in test()
94 val byteArray = data.readByteArray() in test() constant
96 val jdkHash = jdkMessageDigest.digest(byteArray) in test()
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/
DCodecSpecificDataUtil.java38 ParsableByteArray byteArray = new ParsableByteArray(audioSpecificConfig); in parseAlacAudioSpecificConfig() local
39 byteArray.setPosition(9); in parseAlacAudioSpecificConfig()
40 int channelCount = byteArray.readUnsignedByte(); in parseAlacAudioSpecificConfig()
41 byteArray.setPosition(20); in parseAlacAudioSpecificConfig()
42 int sampleRate = byteArray.readUnsignedIntToInt(); in parseAlacAudioSpecificConfig()
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/common/src/main/java/com/google/android/exoplayer2/util/
DCodecSpecificDataUtil.java40 ParsableByteArray byteArray = new ParsableByteArray(audioSpecificConfig); in parseAlacAudioSpecificConfig() local
41 byteArray.setPosition(9); in parseAlacAudioSpecificConfig()
42 int channelCount = byteArray.readUnsignedByte(); in parseAlacAudioSpecificConfig()
43 byteArray.setPosition(20); in parseAlacAudioSpecificConfig()
44 int sampleRate = byteArray.readUnsignedIntToInt(); in parseAlacAudioSpecificConfig()
/external/cbor-java/src/main/java/co/nstant/in/cbor/decoder/
DByteStringDecoder.java47 byte[] byteArray = byteString.getBytes(); in decodeInfinitiveLength()
48 if (byteArray != null) { in decodeInfinitiveLength()
49 bytes.write(byteArray, 0, byteArray.length); in decodeInfinitiveLength()
/external/jackson-core/src/test/java/com/fasterxml/jackson/core/util/
DRequestPayloadTest.java35 byte[] byteArray = new byte[5]; in testCreateTaking2ArgumentsAndCallsGetRawPayload()
36 RequestPayload requestPayload = new RequestPayload(byteArray, "/ _ \" €"); in testCreateTaking2ArgumentsAndCallsGetRawPayload()
38 assertSame(byteArray, requestPayload.getRawPayload()); in testCreateTaking2ArgumentsAndCallsGetRawPayload()
/external/guava/android/guava/src/com/google/common/hash/
DLittleEndianByteArray.java31 private static final LittleEndianBytes byteArray; field in LittleEndianByteArray
45 return byteArray.getLongLittleEndian(input, offset); in load64()
83 byteArray.putLongLittleEndian(sink, offset, value); in store64()
107 return (byteArray instanceof UnsafeByteArray); in usingUnsafe()
256 byteArray = theGetter;
/external/guava/guava/src/com/google/common/hash/
DLittleEndianByteArray.java31 private static final LittleEndianBytes byteArray; field in LittleEndianByteArray
45 return byteArray.getLongLittleEndian(input, offset); in load64()
83 byteArray.putLongLittleEndian(sink, offset, value); in store64()
107 return (byteArray instanceof UnsafeByteArray); in usingUnsafe()
256 byteArray = theGetter;
/external/exoplayer/tree/testutils/src/main/java/com/google/android/exoplayer2/testutil/
DTestUtil.java160 byte[] byteArray = new byte[intArray.length]; in createByteArray()
161 for (int i = 0; i < byteArray.length; i++) { in createByteArray()
163 byteArray[i] = (byte) intArray[i]; in createByteArray()
165 return byteArray; in createByteArray()
176 for (byte[] byteArray : byteArrays) { in joinByteArrays()
177 length += byteArray.length; in joinByteArrays()
181 for (byte[] byteArray : byteArrays) { in joinByteArrays()
182 System.arraycopy(byteArray, 0, joined, length, byteArray.length); in joinByteArrays()
183 length += byteArray.length; in joinByteArrays()
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/amr/
DAmrExtractorNonParameterizedTest.java200 for (byte[] byteArray : byteArrays) { in joinData()
201 totalLength += byteArray.length; in joinData()
205 for (byte[] byteArray : byteArrays) { in joinData()
206 System.arraycopy(byteArray, /* srcPos= */ 0, result, offset, byteArray.length); in joinData()
207 offset += byteArray.length; in joinData()
/external/exoplayer/tree/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/amr/
DAmrExtractorNonParameterizedTest.java200 for (byte[] byteArray : byteArrays) { in joinData()
201 totalLength += byteArray.length; in joinData()
205 for (byte[] byteArray : byteArrays) { in joinData()
206 System.arraycopy(byteArray, /* srcPos= */ 0, result, offset, byteArray.length); in joinData()
207 offset += byteArray.length; in joinData()
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/extractor/src/test/java/com/google/android/exoplayer2/extractor/amr/
DAmrExtractorNonParameterizedTest.java200 for (byte[] byteArray : byteArrays) { in joinData()
201 totalLength += byteArray.length; in joinData()
205 for (byte[] byteArray : byteArrays) { in joinData()
206 System.arraycopy(byteArray, /* srcPos= */ 0, result, offset, byteArray.length); in joinData()
207 offset += byteArray.length; in joinData()
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/sevenz/
DAES256SHA256DecoderTest.java46 byte[] byteArray = new byte[8]; in testDecodeWithNonEmptyString()
47 byteArray[1] = (byte) (-72); in testDecodeWithNonEmptyString()
48 coder.properties = byteArray; in testDecodeWithNonEmptyString()
/external/guava/guava/src/com/google/common/math/
DPairedStats.java305 public static PairedStats fromByteArray(byte[] byteArray) { in fromByteArray() argument
306 checkNotNull(byteArray); in fromByteArray()
308 byteArray.length == BYTES, in fromByteArray()
311 byteArray.length); in fromByteArray()
312 ByteBuffer buffer = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()
/external/guava/android/guava/src/com/google/common/math/
DPairedStats.java305 public static PairedStats fromByteArray(byte[] byteArray) { in fromByteArray() argument
306 checkNotNull(byteArray); in fromByteArray()
308 byteArray.length == BYTES, in fromByteArray()
311 byteArray.length); in fromByteArray()
312 ByteBuffer buffer = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN); in fromByteArray()

1234