Home
last modified time | relevance | path

Searched refs:toByteArray (Results 1 – 25 of 307) sorted by relevance

12345678910>>...13

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DByteArrayHelpers.java40 public static byte[] toByteArray(byte[] array) { in toByteArray() method in ByteArrayHelpers
50 public static byte[] toByteArray(short[] array) { in toByteArray() method in ByteArrayHelpers
51 return toByteArray(array, Short.SIZE); in toByteArray()
60 public static byte[] toByteArray(char[] array) { in toByteArray() method in ByteArrayHelpers
61 return toByteArray(array, Character.SIZE); in toByteArray()
69 public static byte[] toByteArray(int[] array) { in toByteArray() method in ByteArrayHelpers
70 return toByteArray(array, Integer.SIZE); in toByteArray()
78 public static byte[] toByteArray(long[] array) { in toByteArray() method in ByteArrayHelpers
79 return toByteArray(array, Long.SIZE); in toByteArray()
87 public static byte[] toByteArray(float[] array) { in toByteArray() method in ByteArrayHelpers
[all …]
DCameraMetadataTest.java653 toByteArray(1.0f, 2.1f, 3.2f, 4.5f)); in testReadWriteRggbChannelVector()
661 }, toByteArray( in testReadWriteRggbChannelVector()
673 toByteArray(123f, 456f)); in testReadWriteSizeF()
682 toByteArray( in testReadWriteSizeF()
696 toByteArray(10, 11, 1280 - 10, 1024 - 11)); in testReadWriteRectangle()
703 }, toByteArray( in testReadWriteRectangle()
716 toByteArray(1, 2, 1 + 100, 2 + 200, 5)); in testReadWriteMeteringRectangle()
725 toByteArray( in testReadWriteMeteringRectangle()
740 toByteArray(1000, 255, 30, 200, 8)); in testReadWriteHighSpeedVideoConfiguration()
755 toByteArray( in testReadWriteHighSpeedVideoConfiguration()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/compatibility_tests/v2.5.0/tests/src/main/java/com/google/protobuf/test/
DCodedOutputStreamTest.java88 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteVarint()
100 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteVarint()
116 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteVarint()
125 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteVarint()
170 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteLittleEndian32()
178 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteLittleEndian32()
192 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteLittleEndian64()
200 assertEqualBytes(data, rawOutput.toByteArray()); in assertWriteLittleEndian64()
283 byte[] rawBytes = message.toByteArray(); in testWriteWholeMessage()
284 assertEqualBytes(TestUtil.getGoldenMessage().toByteArray(), rawBytes); in testWriteWholeMessage()
[all …]
DByteStringTest.java94 isArrayRange(substring.toByteArray(), bytes, 500, bytes.length - 500)); in testSubstring_BeginIndex()
101 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize()
108 isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes()
118 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize()
128 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer()
136 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding()
144 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Utf8()
153 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Iterable()
190 byte[] originalValue = byteString.toByteArray(); in testReadFrom_mutating()
195 byte[] newValue = byteString.toByteArray(); in testReadFrom_mutating()
[all …]
DParserTest.java67 final byte[] data = message.toByteArray(); in assertRoundTripEquals()
85 final byte[] data = message.toByteArray(); in assertRoundTripEquals()
130 byte[] data = partialMessage.toByteArray(); in testParsePartial()
141 parser.parseFrom(partialMessage.toByteArray()); in testParsePartial()
157 parser.parseFrom(new ByteArrayInputStream(partialMessage.toByteArray())); in testParsePartial()
166 partialMessage.toByteArray())); in testParsePartial()
179 InputStream input = new ByteArrayInputStream(output.toByteArray()); in testParseDelimitedTo()
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/java/core/src/test/java/com/google/protobuf/
DCodedOutputStreamTest.java57 byte[] toByteArray(); in toByteArray() method
77 public byte[] toByteArray() { in toByteArray() method in CodedOutputStreamTest.OutputStreamCoder
78 return output.toByteArray(); in toByteArray()
102 public byte[] toByteArray() { in toByteArray() method in CodedOutputStreamTest.ArrayCoder
134 public byte[] toByteArray() { in toByteArray() method in CodedOutputStreamTest.NioHeapCoder
172 public byte[] toByteArray() { in toByteArray() method in CodedOutputStreamTest.NioDirectCoder
317 final byte[] expectedBytes = TestUtil.getGoldenMessage().toByteArray(); in testWriteWholeMessage()
324 byte[] rawBytes = coder.toByteArray(); in testWriteWholeMessage()
333 assertEqualBytes(OutputType.STREAM, expectedBytes, coder.toByteArray()); in testWriteWholeMessage()
342 byte[] expectedBytes = TestUtil.getGoldenPackedFieldsMessage().toByteArray(); in testWriteWholePackedFieldsMessage()
[all …]
DByteStringTest.java95 isArrayRange(substring.toByteArray(), bytes, 500, bytes.length - 500)); in testSubstring_BeginIndex()
102 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_BytesOffsetSize()
109 isArray(byteString.toByteArray(), bytes)); in testCopyFrom_Bytes()
119 isArrayRange(byteString.toByteArray(), bytes, 500, 200)); in testCopyFrom_ByteBufferSize()
129 isArrayRange(byteString.toByteArray(), bytes, 500, bytes.length - 500)); in testCopyFrom_ByteBuffer()
137 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_StringEncoding()
145 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Utf8()
154 isArrayRange(byteString.toByteArray(), testBytes, 0, testBytes.length)); in testCopyFrom_Iterable()
192 byte[] originalValue = byteString.toByteArray(); in testReadFrom_mutating()
197 byte[] newValue = byteString.toByteArray(); in testReadFrom_mutating()
[all …]
DUnknownFieldSetLiteTest.java63 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testMergeFieldFrom()
76 CodedInputStream input = CodedInputStream.newInstance(foo.toByteArray()); in testSerializedSize()
89 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMergeVarintField()
103 CodedInputStream.newInstance(toByteString(builder).toByteArray()); in testMergeVarintField_negative()
132 CodedInputStream.newInstance(toByteString(unknownFields).toByteArray()); in testMutableCopyOf()
169 Foo copy = Foo.parseFrom(foo.toByteArray()); in testRoundTrips()
174 Foo secondCopy = Foo.parseFrom(foo.toByteArray()); in testRoundTrips()
179 Foo copyOfCopy = Foo.parseFrom(copy.toByteArray(), extensionRegistry); in testRoundTrips()
309 .build().toByteArray()) in testEndToEnd()
326 return ByteString.copyFrom(byteArrayOutputStream.toByteArray()); in toByteString()
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DWap230WspContentTypeTest.java226 HexDump.toByteArray((byte) (value | WSP_SHORT_INTEGER_MASK))); in testWellKnownShortIntegerMimeTypeValues()
259 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testDecodeReturnsFalse_WhenOnlyAZeroBytePresent()
270 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testConstrainedMediaExtensionMedia()
286 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthExtensionMedia()
301 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownShortInteger()
317 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownShortIntegerWithUnknownValue()
336 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownLongInteger()
355 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormShortLengthWellKnownLongIntegerWithUnknownValue()
374 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormLengthQuoteWellKnownShortInteger()
392 WspTypeDecoder unit = new WspTypeDecoder(out.toByteArray()); in testGeneralFormLengthQuoteWellKnownShortIntegerWithUnknownValue()
[all …]
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/javanano/src/main/java/com/google/protobuf/nano/
DMessageNano.java99 public static final byte[] toByteArray(MessageNano msg) { in toByteArray() method in MessageNano
101 toByteArray(msg, result, 0, result.length); in toByteArray()
113 public static final void toByteArray(MessageNano msg, byte[] data, int offset, int length) { in toByteArray() method in MessageNano
174 toByteArray(a, aByteArray, 0, serializedSize); in messageNanoEquals()
175 toByteArray(b, bByteArray, 0, serializedSize); in messageNanoEquals()
DFieldData.java163 return Arrays.equals(toByteArray(), other.toByteArray()); in equals()
175 result = 31 * result + Arrays.hashCode(toByteArray()); in hashCode()
183 private byte[] toByteArray() throws IOException { in toByteArray() method in FieldData
/frameworks/opt/gamesdk/third_party/protobuf-3.0.0/javanano/src/test/java/com/google/protobuf/nano/
DNanoTest.java83 byte [] result = MessageNano.toByteArray(msg); in testSimpleMessageNano()
122 byte [] result = MessageNano.toByteArray(msg); in testRecursiveMessageNano()
140 assertEquals(0, MessageNano.toByteArray(msg).length); in testMessageNoFields()
152 byte [] result = MessageNano.toByteArray(msg); in testNanoRequiredInt32()
172 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalInt32()
193 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalInt64()
214 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalUint32()
235 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalUint64()
256 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalSint32()
277 byte [] result = MessageNano.toByteArray(msg); in testNanoOptionalSint64()
[all …]
/frameworks/base/core/java/android/hardware/hdmi/
DHdmiTimerRecordSources.java199 /* package */ int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimeUnit
345 int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimerInfo
353 index += mStartTime.toByteArray(data, index); in toByteArray()
354 index += mDuration.toByteArray(data, index); in toByteArray()
393 int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiTimerRecordSources.TimerRecordSource
396 index += mTimerInfo.toByteArray(data, index); in toByteArray()
398 mRecordSource.toByteArray(false, data, index); in toByteArray()
427 mRecordSource.toByteArray(false, data, index + 1); in extraParamToByteArray()
DHdmiRecordSources.java76 /* package */ final int toByteArray(boolean includeType, byte[] data, int index) { in toByteArray() method in HdmiRecordSources.RecordSource
166 int toByteArray(byte[] data, int index); in toByteArray() method
198 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.AribData
227 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.AtscData
261 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.DvbData
290 private int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.ChannelIdentifier
331 public int toByteArray(byte[] data, int index) { in toByteArray() method in HdmiRecordSources.DigitalChannelData
332 mChannelIdentifier.toByteArray(data, index); in toByteArray()
530 mIdentification.toByteArray(data, index + 1); in extraParamToByteArray()
/frameworks/base/wifi/java/android/net/wifi/
DWifiSsid.java179 byte[] ssidBytes = octets.toByteArray(); in toString()
208 return Arrays.equals(octets.toByteArray(), that.octets.toByteArray()); in equals()
213 return Arrays.hashCode(octets.toByteArray()); in hashCode()
225 return isArrayAllZeroes(octets.toByteArray()); in isHidden()
231 return octets.toByteArray(); in getOctets()
252 dest.writeByteArray(octets.toByteArray()); in writeToParcel()
/frameworks/base/media/java/android/media/
DMediaCas.java163 ArrayList<Byte> sessionId = toByteArray(bundle.getByteArray(SESSION_KEY)); in handleMessage()
228 private ArrayList<Byte> toByteArray(@NonNull byte[] data, int offset, int length) { in toByteArray() method in MediaCas
236 private ArrayList<Byte> toByteArray(@Nullable byte[] data) { in toByteArray() method in MediaCas
240 return toByteArray(data, 0, data.length); in toByteArray()
292 mICas.setSessionPrivateData(mSessionId, toByteArray(data, 0, data.length))); in setPrivateData()
316 mICas.processEcm(mSessionId, toByteArray(data, offset, length))); in processEcm()
360 mICasV11.sendSessionEvent(mSessionId, event, arg, toByteArray(data))); in sendSessionEvent()
551 mICas.setPrivateData(toByteArray(data, 0, data.length))); in setPrivateData()
607 mICas.processEmm(toByteArray(data, offset, length))); in processEmm()
646 mICas.sendEvent(event, arg, toByteArray(data))); in sendEvent()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
DOsuProviderInfoTestUtil.java69 return out.toByteArray(); in getTestData()
87 return out.toByteArray(); in getTestDataWithInvalidLength()
129 return out.toByteArray(); in getTestPayload()
139 return out.toByteArray(); in getI18NameListData()
154 return out.toByteArray(); in getI18NameData()
DANQPParserTest.java56 return stream.toByteArray(); in getVenueNamePayload()
73 return stream.toByteArray(); in getDomainNamePayload()
94 return stream.toByteArray(); in getRoamingConsortiumPayload()
112 return stream.toByteArray(); in getNAIRealmPayload()
130 return stream.toByteArray(); in getThreeGPPNetworkPayload()
153 return stream.toByteArray(); in getVendorSpecificPayload()
217 return stream.toByteArray(); in getHSConnectionCapabilityPayload()
233 return out.toByteArray(); in getHSOsuProvidersPayload()
259 return stream.toByteArray(); in getI18NameListPayload()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DBitwiseStreamsTest.java40 byte[] outBuf = outStream.toByteArray(); in testOne()
55 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testTwo()
69 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testThree()
86 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testFour()
108 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testFive()
127 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testSix()
152 BitwiseInputStream inStream = new BitwiseInputStream(outStream.toByteArray()); in testExpandArray()
/frameworks/base/services/tests/servicestests/src/com/android/server/timezone/
DCheckTokenTest.java33 public void toByteArray() throws Exception { in toByteArray() method in CheckTokenTest
37 assertEquals(originalToken, CheckToken.fromByteArray(originalToken.toByteArray())); in toByteArray()
45 byte[] validTokenBytes = token.toByteArray(); in fromByteArray()
/frameworks/base/core/java/android/util/
DPackageUtils.java51 digests[i] = computeSha256Digest(signatures[i].toByteArray()); in computeSignaturesSha256Digests()
67 return computeSha256Digest(signatures[0].toByteArray()); in computeSignaturesSha256Digest()
100 return computeSha256Digest(bytes.toByteArray()); in computeSignaturesSha256Digest()
/frameworks/base/core/java/com/android/internal/util/
DHexDump.java101 return toHexString(toByteArray(b)); in toHexString()
141 return toHexString(toByteArray(i)); in toHexString()
144 public static byte[] toByteArray(byte b) in toByteArray() method in HexDump
151 public static byte[] toByteArray(int i) in toByteArray() method in HexDump
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DAppBackupUtilsTest.java527 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
528 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
529 Signature signature3Copy = new Signature(SIGNATURE_3.toByteArray()); in signaturesMatch_equalSignatures_returnsTrue()
550 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_extraSignatureInTarget_returnsTrue()
551 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_extraSignatureInTarget_returnsTrue()
572 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_extraSignatureInStored_returnsFalse()
573 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_extraSignatureInStored_returnsFalse()
594 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_oneNonMatchingSignature_returnsFalse()
595 Signature signature2Copy = new Signature(SIGNATURE_2.toByteArray()); in signaturesMatch_oneNonMatchingSignature_returnsFalse()
617 Signature signature1Copy = new Signature(SIGNATURE_1.toByteArray()); in signaturesMatch_singleStoredSignatureNoRotation_returnsTrue()
[all …]
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/
DInlineLengthsEncryptedChunkEncoder.java41 writer.writeBytes(toByteArray(length)); in writeChunkToWriter()
63 static byte[] toByteArray(int value) { in toByteArray() method in InlineLengthsEncryptedChunkEncoder
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/rtt/
DRttNativeTest.java142 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
150 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
158 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequest()
192 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestNotPrivilegedNo80211mcSupportMixed()
200 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestNotPrivilegedNo80211mcSupportMixed()
245 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestWithLimitedCapabilities()
257 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilities()
299 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilitiesNoOverlap()
423 equalTo(MacAddress.fromString("05:06:07:08:09:0A").toByteArray())); in testRangeResults()

12345678910>>...13