Home
last modified time | relevance | path

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

12

/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DNativeUtil.java61 byte[] byteArray = new byte[encoded.remaining()]; in stringToByteArrayList()
62 encoded.get(byteArray); in stringToByteArrayList()
63 return byteArrayToArrayList(byteArray); in stringToByteArrayList()
79 byte[] byteArray = new byte[byteArrayList.size()]; in stringFromByteArrayList()
82 byteArray[i] = b; in stringFromByteArrayList()
85 return new String(byteArray, StandardCharsets.UTF_8); in stringFromByteArrayList()
107 public static String stringFromByteArray(byte[] byteArray) { in stringFromByteArray() argument
108 if (byteArray == null) { in stringFromByteArray()
111 return new String(byteArray); in stringFromByteArray()
253 byte[] byteArray = byteArrayFromArrayList(bytes); in bytesToHexOrQuotedString()
[all …]
DStringUtil.java25 public static boolean isAsciiPrintable(byte[] byteArray) { in isAsciiPrintable() argument
26 if (byteArray == null) { in isAsciiPrintable()
30 for (byte b : byteArray) { in isAsciiPrintable()
/frameworks/base/media/jni/
Dandroid_media_MediaMuxer.cpp90 jbyteArray byteArray = NULL; in android_media_MediaMuxer_writeSampleData() local
94 byteArray = in android_media_MediaMuxer_writeSampleData()
97 if (byteArray == NULL) { in android_media_MediaMuxer_writeSampleData()
104 dst = env->GetByteArrayElements(byteArray, &isCopy); in android_media_MediaMuxer_writeSampleData()
106 dstSize = env->GetArrayLength(byteArray); in android_media_MediaMuxer_writeSampleData()
114 if (byteArray != NULL) { in android_media_MediaMuxer_writeSampleData()
115 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0); in android_media_MediaMuxer_writeSampleData()
126 if (byteArray != NULL) { in android_media_MediaMuxer_writeSampleData()
127 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0); in android_media_MediaMuxer_writeSampleData()
Dandroid_media_MediaDescrambler.cpp111 jbyteArray byteArray = NULL; in getBufferAndSize() local
121 byteArray = in getBufferAndSize()
124 if (byteArray == NULL) { in getBufferAndSize()
129 ptr = env->GetByteArrayElements(byteArray, &isCopy); in getBufferAndSize()
133 if (byteArray != NULL) { in getBufferAndSize()
134 env->ReleaseByteArrayElements(byteArray, (jbyte *)ptr, 0); in getBufferAndSize()
141 *outByteArray = byteArray; in getBufferAndSize()
Dandroid_media_MediaExtractor.cpp174 jbyteArray byteArray = NULL; in readSampleData() local
184 byteArray = in readSampleData()
187 if (byteArray == NULL) { in readSampleData()
192 dst = env->GetByteArrayElements(byteArray, &isCopy); in readSampleData()
194 dstSize = (size_t) env->GetArrayLength(byteArray); in readSampleData()
200 if (byteArray != NULL) { in readSampleData()
201 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0); in readSampleData()
211 if (byteArray != NULL) { in readSampleData()
212 env->ReleaseByteArrayElements(byteArray, (jbyte *)dst, 0); in readSampleData()
Dandroid_media_MediaCrypto.cpp143 static Vector<uint8_t> JByteArrayToVector(JNIEnv *env, jbyteArray const &byteArray) { in JByteArrayToVector() argument
145 size_t length = env->GetArrayLength(byteArray); in JByteArrayToVector()
147 env->GetByteArrayRegion(byteArray, 0, length, (jbyte *)vector.editArray()); in JByteArrayToVector()
Dandroid_media_Streams.cpp536 jbyteArray byteArray = in ConvertKeyValueArraysToMessage() local
538 CHECK(byteArray != NULL); in ConvertKeyValueArraysToMessage()
541 byteArray, in ConvertKeyValueArraysToMessage()
546 env->DeleteLocalRef(byteArray); byteArray = NULL; in ConvertKeyValueArraysToMessage()
/frameworks/av/drm/mediacas/plugins/mock/
DMockSessionLibrary.cpp48 uint8_t *byteArray = (uint8_t *) &mNextSessionId; in addSession() local
49 sessionId->push_back(byteArray[3]); in addSession()
50 sessionId->push_back(byteArray[2]); in addSession()
51 sessionId->push_back(byteArray[1]); in addSession()
52 sessionId->push_back(byteArray[0]); in addSession()
/frameworks/av/drm/mediacas/plugins/clearkey/
DClearKeySessionLibrary.cpp61 uint8_t *byteArray = (uint8_t *) &mNextSessionId; in addSession() local
62 sessionId->push_back(byteArray[3]); in addSession()
63 sessionId->push_back(byteArray[2]); in addSession()
64 sessionId->push_back(byteArray[1]); in addSession()
65 sessionId->push_back(byteArray[0]); in addSession()
/frameworks/base/core/jni/android/graphics/
DMovie.cpp95 jbyteArray byteArray = env->NewByteArray(16*1024); in movie_decodeStream() local
96 ScopedLocalRef<jbyteArray> scoper(env, byteArray); in movie_decodeStream()
97 SkStream* strm = CreateJavaInputStreamAdaptor(env, istream, byteArray); in movie_decodeStream()
116 jbyteArray byteArray, in movie_decodeByteArray() argument
119 NPE_CHECK_RETURN_ZERO(env, byteArray); in movie_decodeByteArray()
121 int totalLength = env->GetArrayLength(byteArray); in movie_decodeByteArray()
127 AutoJavaByteArray ar(env, byteArray); in movie_decodeByteArray()
/frameworks/opt/car/setupwizard/library/utils/src/com/android/car/setupwizardlib/
DInitialLockSetupHelper.java64 byte[] byteArray = new byte[chars.length()]; in charSequenceToByteArray()
66 byteArray[i] = (byte) chars.charAt(i); in charSequenceToByteArray()
68 return byteArray; in charSequenceToByteArray()
/frameworks/ex/framesequence/jni/
DFrameSequenceJNI.cpp49 jbyteArray byteArray, jint offset, jint length) { in nativeDecodeByteArray() argument
50 jbyte* bytes = reinterpret_cast<jbyte*>(env->GetPrimitiveArrayCritical(byteArray, NULL)); in nativeDecodeByteArray()
58 env->ReleasePrimitiveArrayCritical(byteArray, bytes, 0); in nativeDecodeByteArray()
78 jobject istream, jbyteArray byteArray) { in nativeDecodeStream() argument
79 JavaInputStream stream(env, istream, byteArray); in nativeDecodeStream()
DStream.h76 JavaInputStream(JNIEnv* env, jobject inputStream, jbyteArray byteArray) : in JavaInputStream() argument
79 mByteArray(byteArray), in JavaInputStream()
80 mByteArrayLength(env->GetArrayLength(byteArray)) {} in JavaInputStream()
/frameworks/base/media/java/android/media/
DMediaCas.java229 ArrayList<Byte> byteArray = new ArrayList<Byte>(length); in toByteArray() local
231 byteArray.add(Byte.valueOf(data[offset + i])); in toByteArray()
233 return byteArray; in toByteArray()
243 private byte[] toBytes(@NonNull ArrayList<Byte> byteArray) { in toBytes() argument
245 if (byteArray != null) { in toBytes()
246 data = new byte[byteArray.size()]; in toBytes()
248 data[i] = byteArray.get(i); in toBytes()
DMediaExtractor.java327 ArrayList<Byte> byteArray = new ArrayList<Byte>(data.length); in toByteArray() local
329 byteArray.add(i, Byte.valueOf(data[i])); in toByteArray()
331 return byteArray; in toByteArray()
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java185 byte[] byteArray = new byte[buffer.limit()];
186 buffer.get(byteArray);
188 return Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(byteArray));
DFont_Builder_Delegate.java78 byte[] byteArray = Files.readAllBytes(new File(fullPath).toPath()); in nGetAssetBuffer()
79 return ByteBuffer.wrap(byteArray); in nGetAssetBuffer()
/frameworks/base/telephony/common/com/google/android/mms/pdu/
DPduPart.java159 byte[] byteArray = new byte[mPartData.length]; in getData()
160 System.arraycopy(mPartData, 0, byteArray, 0, mPartData.length); in getData()
161 return byteArray; in getData()
DEncodedStringValue.java114 byte[] byteArray = new byte[mData.length]; in getTextString()
116 System.arraycopy(mData, 0, byteArray, 0, mData.length); in getTextString()
117 return byteArray; in getTextString()
/frameworks/ex/framesequence/src/android/support/rastermill/
DFrameSequence.java78 byte[] byteArray = buffer.array(); in decodeByteBuffer()
79 return decodeByteArray(byteArray, buffer.position(), buffer.remaining()); in decodeByteBuffer()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareServiceImplTest.java383 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testPublishServiceNameTooLong()
385 byteArray[i] = 'a'; in testPublishServiceNameTooLong()
387 doBadPublishConfiguration(new String(byteArray), null, null); in testPublishServiceNameTooLong()
478 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testSubscribeServiceNameTooLong()
480 byteArray[i] = 'a'; in testSubscribeServiceNameTooLong()
482 doBadSubscribeConfiguration(new String(byteArray), null, null); in testSubscribeServiceNameTooLong()
/frameworks/base/core/java/android/hardware/hdmi/
DHdmiRecordSources.java750 private static int shortToByteArray(short value, byte[] byteArray, int index) { in shortToByteArray() argument
751 byteArray[index] = (byte) ((value >>> 8) & 0xFF); in shortToByteArray()
752 byteArray[index + 1] = (byte) (value & 0xFF); in shortToByteArray()
/frameworks/base/drm/jni/
Dandroid_drm_DrmManagerClient.cpp53 JNIEnv* env, jbyteArray byteArray, int* dataLength);
99 jbyteArray byteArray = (jbyteArray) env->GetObjectField(object, fieldID); in getByteArrayValue() local
100 return Utility::getByteArrayValue(env, byteArray, dataLength); in getByteArrayValue()
105 char* Utility::getByteArrayValue(JNIEnv* env, jbyteArray byteArray, int* dataLength) { in getByteArrayValue() argument
107 if (NULL != byteArray) { in getByteArrayValue()
108 jint length = env->GetArrayLength(byteArray); in getByteArrayValue()
113 env->GetByteArrayRegion(byteArray, (jint)0, length, (jbyte *) data); in getByteArrayValue()
/frameworks/base/services/core/jni/
Dcom_android_server_location_GnssLocationProvider.cpp1347 jbyteArray byteArray = nullptr; in agnssStatusIpV6Cb() local
1349 byteArray = env->NewByteArray(16); in agnssStatusIpV6Cb()
1350 if (byteArray != nullptr) { in agnssStatusIpV6Cb()
1351 env->SetByteArrayRegion(byteArray, 0, 16, in agnssStatusIpV6Cb()
1364 jsize byteArrayLength = byteArray != nullptr ? env->GetArrayLength(byteArray) : 0; in agnssStatusIpV6Cb()
1367 agps_status.type, agps_status.status, byteArray); in agnssStatusIpV6Cb()
1371 if (byteArray) { in agnssStatusIpV6Cb()
1372 env->DeleteLocalRef(byteArray); in agnssStatusIpV6Cb()
1381 jbyteArray byteArray = nullptr; in agnssStatusIpV4Cb() local
1384 byteArray = convertToIpV4(ipAddr); in agnssStatusIpV4Cb()
[all …]
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DOsuServerConnection.java512 byte[] byteArray = bos.toByteArray(); in getCert()
514 String s = new String(byteArray); in getCert()
515 byteArray = android.util.Base64.decode(s, android.util.Base64.DEFAULT); in getCert()
519 new ByteArrayInputStream(byteArray)); in getCert()

12