Home
last modified time | relevance | path

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

12

/frameworks/opt/net/wifi/service/java/com/android/server/wifi/util/
DNativeUtil.java60 byte[] byteArray = new byte[encoded.remaining()]; in stringToByteArrayList()
61 encoded.get(byteArray); in stringToByteArrayList()
62 return byteArrayToArrayList(byteArray); in stringToByteArrayList()
78 byte[] byteArray = new byte[byteArrayList.size()]; in stringFromByteArrayList()
81 byteArray[i] = b; in stringFromByteArrayList()
84 return new String(byteArray, StandardCharsets.UTF_8); in stringFromByteArrayList()
106 public static String stringFromByteArray(byte[] byteArray) { in stringFromByteArray() argument
107 if (byteArray == null) { in stringFromByteArray()
110 return new String(byteArray); in stringFromByteArray()
252 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_Streams.cpp475 jbyteArray byteArray = in ConvertKeyValueArraysToMessage() local
477 CHECK(byteArray != NULL); in ConvertKeyValueArraysToMessage()
480 byteArray, in ConvertKeyValueArraysToMessage()
485 env->DeleteLocalRef(byteArray); byteArray = NULL; in ConvertKeyValueArraysToMessage()
Dandroid_media_MediaCrypto.cpp129 static Vector<uint8_t> JByteArrayToVector(JNIEnv *env, jbyteArray const &byteArray) { in JByteArrayToVector() argument
131 size_t length = env->GetArrayLength(byteArray); in JByteArrayToVector()
133 env->GetByteArrayRegion(byteArray, 0, length, (jbyte *)vector.editArray()); in JByteArrayToVector()
/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/libs/hwui/jni/
DMovie.cpp93 jbyteArray byteArray = env->NewByteArray(16*1024); in movie_decodeStream() local
94 ScopedLocalRef<jbyteArray> scoper(env, byteArray); in movie_decodeStream()
95 SkStream* strm = CreateJavaInputStreamAdaptor(env, istream, byteArray); in movie_decodeStream()
114 jbyteArray byteArray, in movie_decodeByteArray() argument
117 NPE_CHECK_RETURN_ZERO(env, byteArray); in movie_decodeByteArray()
119 int totalLength = env->GetArrayLength(byteArray); in movie_decodeByteArray()
125 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/tests/MtpTests/src/android/mtp/
DMtpDatabaseTest.java212 byte[] byteArray; in testThumbnail()
218 byteArray = mMtpDatabase.getThumbnailData(fileHandle); in testThumbnail()
221 Assert.assertNotNull("Fail to generate thumbnail:" + imgFile.getPath(), byteArray); in testThumbnail()
223 Bitmap testBitmap = decodeBitmapFromBytes(byteArray, 4); in testThumbnail()
225 } else Assert.assertNull("Bad image should return null:" + imgFile.getPath(), byteArray); in testThumbnail()
/frameworks/base/telephony/common/com/google/android/mms/pdu/
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()
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()
/frameworks/layoutlib/bridge/src/android/graphics/fonts/
DFontFamily_Builder_Delegate.java187 byte[] byteArray = new byte[buffer.limit()];
189 buffer.get(byteArray);
190 return Font.createFont(Font.TRUETYPE_FONT, new ByteArrayInputStream(byteArray));
/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/base/media/java/android/media/
DMediaCas.java441 ArrayList<Byte> byteArray = new ArrayList<Byte>(length); in toByteArray() local
443 byteArray.add(Byte.valueOf(data[offset + i])); in toByteArray()
445 return byteArray; in toByteArray()
455 private byte[] toBytes(@NonNull ArrayList<Byte> byteArray) { in toBytes() argument
457 if (byteArray != null) { in toBytes()
458 data = new byte[byteArray.size()]; in toBytes()
460 data[i] = byteArray.get(i); in toBytes()
DMediaExtractor.java329 ArrayList<Byte> byteArray = new ArrayList<Byte>(data.length); in toByteArray() local
331 byteArray.add(i, Byte.valueOf(data[i])); in toByteArray()
333 return byteArray; in toByteArray()
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/
DWifiAwareServiceImplTest.java389 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testPublishServiceNameTooLong()
391 byteArray[i] = 'a'; in testPublishServiceNameTooLong()
393 doBadPublishConfiguration(new String(byteArray), null, null); in testPublishServiceNameTooLong()
484 byte[] byteArray = new byte[MAX_LENGTH + 1]; in testSubscribeServiceNameTooLong()
486 byteArray[i] = 'a'; in testSubscribeServiceNameTooLong()
488 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/wifi/tests/src/android/net/wifi/nl80211/
DWifiNl80211ManagerTest.java1141 byte[] byteArray = byteArrayFromArrayList(bytes); in bytesToHexOrQuotedString()
1146 CharBuffer decoded = decoder.decode(ByteBuffer.wrap(byteArray)); in bytesToHexOrQuotedString()
1151 return hexStringFromByteArray(byteArray); in bytesToHexOrQuotedString()
1176 byte[] byteArray = new byte[bytes.size()]; in byteArrayFromArrayList()
1179 byteArray[i++] = b; in byteArrayFromArrayList()
1181 return byteArray; in byteArrayFromArrayList()
1233 byte[] byteArray = new byte[encoded.remaining()]; in stringToByteArrayList()
1234 encoded.get(byteArray); in stringToByteArrayList()
1235 return byteArrayToArrayList(byteArray); in stringToByteArrayList()
/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/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/
DOsuServerConnection.java538 byte[] byteArray = bos.toByteArray(); in getCert()
540 String s = new String(byteArray); in getCert()
541 byteArray = android.util.Base64.decode(s, android.util.Base64.DEFAULT); in getCert()
545 new ByteArrayInputStream(byteArray)); in getCert()

12