Searched defs:byteBuffer (Results 1 - 21 of 21) sorted by relevance

/frameworks/base/services/net/java/android/net/netlink/
H A DNetlinkErrorMessage.java32 public static NetlinkErrorMessage parse(StructNlMsgHdr header, ByteBuffer byteBuffer) { argument
35 errorMsg.mNlMsgErr = StructNlMsgErr.parse(byteBuffer);
H A DNetlinkMessage.java45 public static NetlinkMessage parse(ByteBuffer byteBuffer) { argument
46 final int startPosition = (byteBuffer != null) ? byteBuffer.position() : -1;
47 final StructNlMsgHdr nlmsghdr = StructNlMsgHdr.parse(byteBuffer);
54 if (payloadLength < 0 || payloadLength > byteBuffer.remaining()) {
56 byteBuffer.position(byteBuffer.limit());
63 return (NetlinkMessage) NetlinkErrorMessage.parse(nlmsghdr, byteBuffer);
65 byteBuffer.position(byteBuffer
[all...]
H A DStructNlMsgErr.java36 public static boolean hasAvailableSpace(ByteBuffer byteBuffer) { argument
37 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE;
40 public static StructNlMsgErr parse(ByteBuffer byteBuffer) { argument
41 if (!hasAvailableSpace(byteBuffer)) { return null; }
47 struct.error = byteBuffer.getInt();
48 struct.msg = StructNlMsgHdr.parse(byteBuffer);
55 public void pack(ByteBuffer byteBuffer) { argument
59 byteBuffer.putInt(error);
61 msg.pack(byteBuffer);
[all...]
H A DStructNdaCacheInfo.java36 private static boolean hasAvailableSpace(ByteBuffer byteBuffer) { argument
37 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE;
40 public static StructNdaCacheInfo parse(ByteBuffer byteBuffer) { argument
41 if (!hasAvailableSpace(byteBuffer)) { return null; }
47 struct.ndm_used = byteBuffer.getInt();
48 struct.ndm_confirmed = byteBuffer.getInt();
49 struct.ndm_updated = byteBuffer.getInt();
50 struct.ndm_refcnt = byteBuffer.getInt();
H A DStructNlAttr.java40 // |byteBuffer| and without copying or interpreting any value bytes.
43 public static StructNlAttr peek(ByteBuffer byteBuffer) { argument
44 if (byteBuffer == null || byteBuffer.remaining() < NLA_HEADERLEN) {
47 final int baseOffset = byteBuffer.position();
50 struct.nla_len = byteBuffer.getShort();
51 struct.nla_type = byteBuffer.getShort();
52 struct.mByteOrder = byteBuffer.order();
54 byteBuffer.position(baseOffset);
62 public static StructNlAttr parse(ByteBuffer byteBuffer) { argument
119 pack(ByteBuffer byteBuffer) argument
[all...]
H A DStructNlMsgHdr.java77 public static boolean hasAvailableSpace(ByteBuffer byteBuffer) { argument
78 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE;
81 public static StructNlMsgHdr parse(ByteBuffer byteBuffer) { argument
82 if (!hasAvailableSpace(byteBuffer)) { return null; }
88 struct.nlmsg_len = byteBuffer.getInt();
89 struct.nlmsg_type = byteBuffer.getShort();
90 struct.nlmsg_flags = byteBuffer.getShort();
91 struct.nlmsg_seq = byteBuffer.getInt();
92 struct.nlmsg_pid = byteBuffer
115 pack(ByteBuffer byteBuffer) argument
[all...]
H A DStructNdMsg.java97 private static boolean hasAvailableSpace(ByteBuffer byteBuffer) { argument
98 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE;
101 public static StructNdMsg parse(ByteBuffer byteBuffer) { argument
102 if (!hasAvailableSpace(byteBuffer)) { return null; }
108 struct.ndm_family = byteBuffer.get();
109 final byte pad1 = byteBuffer.get();
110 final short pad2 = byteBuffer.getShort();
111 struct.ndm_ifindex = byteBuffer.getInt();
112 struct.ndm_state = byteBuffer
128 pack(ByteBuffer byteBuffer) argument
[all...]
H A DRtNetlinkNeighborMessage.java57 private static StructNlAttr findNextAttrOfType(short attrType, ByteBuffer byteBuffer) { argument
58 while (byteBuffer != null && byteBuffer.remaining() > 0) {
59 final StructNlAttr nlAttr = StructNlAttr.peek(byteBuffer);
64 return StructNlAttr.parse(byteBuffer);
66 if (byteBuffer.remaining() < nlAttr.getAlignedLength()) {
69 byteBuffer.position(byteBuffer.position() + nlAttr.getAlignedLength());
74 public static RtNetlinkNeighborMessage parse(StructNlMsgHdr header, ByteBuffer byteBuffer) { argument
77 neighMsg.mNdmsg = StructNdMsg.parse(byteBuffer);
219 packNlAttr(short nlType, byte[] nlValue, ByteBuffer byteBuffer) argument
227 pack(ByteBuffer byteBuffer) argument
[all...]
/frameworks/base/packages/WallpaperCropper/src/com/android/gallery3d/exif/
H A DExifModifier.java47 protected ExifModifier(ByteBuffer byteBuffer, ExifInterface iRef) throws IOException, argument
49 mByteBuffer = byteBuffer;
50 mOffsetBase = byteBuffer.position();
54 is = new ByteBufferInputStream(byteBuffer);
/frameworks/support/emoji/core/src/android/support/text/emoji/
H A DMetadataRepo.java111 * @param byteBuffer ByteBuffer to read emoji metadata from
114 @NonNull final ByteBuffer byteBuffer) throws IOException {
115 return new MetadataRepo(typeface, MetadataListReader.read(byteBuffer));
113 create(@onNull final Typeface typeface, @NonNull final ByteBuffer byteBuffer) argument
H A DMetadataListReader.java86 * @param byteBuffer ByteBuffer to read emoji metadata from
88 static MetadataList read(final ByteBuffer byteBuffer) throws IOException { argument
89 final ByteBuffer newBuffer = byteBuffer.duplicate();
311 * @param byteBuffer ByteBuffer to read from
313 ByteBufferReader(final ByteBuffer byteBuffer) { argument
314 mByteBuffer = byteBuffer;
/frameworks/base/core/jni/
H A Dandroid_net_LocalSocketImpl.cpp355 jbyte* byteBuffer; local
379 byteBuffer = env->GetByteArrayElements(buffer, NULL);
381 if (NULL == byteBuffer) {
387 fd, byteBuffer + off, len);
391 env->ReleaseByteArrayElements(buffer, byteBuffer, 0);
423 jbyte* byteBuffer; local
441 byteBuffer = env->GetByteArrayElements(buffer,NULL);
443 if (NULL == byteBuffer) {
449 byteBuffer + off, len);
453 env->ReleaseByteArrayElements(buffer, byteBuffer, JNI_ABOR
[all...]
/frameworks/base/core/tests/BTtraffic/src/com/android/google/experimental/bttraffic/
H A DBTtraffic.java218 ByteBuffer byteBuffer = ByteBuffer.allocate(maxbuffersize);
221 readBytesIntoBuffer(inputStream, byteBuffer, 4);
222 byteBuffer.flip();
223 int length = byteBuffer.getInt();
226 readBytesIntoBuffer(inputStream, byteBuffer, length);
233 void readBytesIntoBuffer(InputStream inputStream, ByteBuffer byteBuffer, int numToRead) argument
235 byteBuffer.clear();
237 int position = byteBuffer.position();
242 int count = inputStream.read(byteBuffer.array(), position, remaining);
246 byteBuffer
[all...]
/frameworks/base/services/net/java/android/net/ip/
H A DIpReachabilityMonitor.java457 final ByteBuffer byteBuffer;
459 byteBuffer = recvKernelReply();
465 if (byteBuffer == null) {
468 parseNetlinkMessageBuffer(byteBuffer, whenMs);
514 private void parseNetlinkMessageBuffer(ByteBuffer byteBuffer, long whenMs) { argument
515 while (byteBuffer.remaining() > 0) {
516 final int position = byteBuffer.position();
517 final NetlinkMessage nlMsg = NetlinkMessage.parse(byteBuffer);
519 byteBuffer.position(position);
520 Log.e(TAG, "unparsable netlink msg: " + NetlinkConstants.hexify(byteBuffer));
[all...]
/frameworks/native/opengl/libs/EGL/
H A DBlobCache.cpp192 uint8_t* byteBuffer = reinterpret_cast<uint8_t*>(buffer); local
207 EntryHeader* eheader = reinterpret_cast<EntryHeader*>(&byteBuffer[byteOffset]);
251 const uint8_t* byteBuffer = reinterpret_cast<const uint8_t*>(buffer); local
262 &byteBuffer[byteOffset]);
/frameworks/base/media/java/android/media/
H A DMediaSync.java177 public AudioBuffer(@NonNull ByteBuffer byteBuffer, int bufferId, argument
179 mByteBuffer = byteBuffer;
/frameworks/base/media/jni/
H A Dandroid_media_ImageWriter.cpp732 jobject byteBuffer; local
764 byteBuffer = env->NewDirectByteBuffer(pData, dataSize);
765 if ((byteBuffer == NULL) && (env->ExceptionCheck() == false)) {
773 gSurfacePlaneClassInfo.ctor, thiz, rowStride, pixelStride, byteBuffer);
H A Dandroid_media_ImageReader.cpp713 jobject byteBuffer = NULL; local
748 byteBuffer = env->NewDirectByteBuffer(pData, dataSize);
749 if ((byteBuffer == NULL) && (env->ExceptionCheck() == false)) {
757 gSurfacePlaneClassInfo.ctor, thiz, rowStride, pixelStride, byteBuffer);
H A Dandroid_media_MediaCodec.cpp437 jobject byteBuffer = NULL; local
439 env, !input /* readOnly */, true /* clearBuffer */, buffer, &byteBuffer);
443 if (byteBuffer != NULL) {
445 *bufArray, i, byteBuffer);
447 env->DeleteLocalRef(byteBuffer);
448 byteBuffer = NULL;
473 jobject byteBuffer = local
475 if (readOnly && byteBuffer != NULL) {
477 byteBuffer, mByteBufferAsReadOnlyBufferMethodID);
478 env->DeleteLocalRef(byteBuffer);
549 jobject byteBuffer = NULL; local
[all...]
/frameworks/rs/support/jni/
H A Dandroid_renderscript_RenderScript.cpp2257 jobject byteBuffer = _env->NewDirectByteBuffer(ptr, (jlong) bufferSize); local
2258 return byteBuffer;
/frameworks/base/rs/jni/
H A Dandroid_renderscript_RenderScript.cpp2797 jobject byteBuffer = nullptr; local
2807 byteBuffer = _env->NewDirectByteBuffer(ptr, (jlong) bufferSize);
2810 return byteBuffer;

Completed in 381 milliseconds