Searched refs:byteBuffer (Results 1 - 25 of 34) sorted by relevance

12

/frameworks/base/services/net/java/android/net/netlink/
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 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 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 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...]
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 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 DNetlinkSocket.java122 ByteBuffer byteBuffer = ByteBuffer.allocate(bufsize);
123 int length = Os.read(mDescriptor, byteBuffer);
127 byteBuffer.position(0);
128 byteBuffer.limit(length);
129 byteBuffer.order(ByteOrder.nativeOrder());
130 return byteBuffer;
H A DNetlinkErrorMessage.java32 public static NetlinkErrorMessage parse(StructNlMsgHdr header, ByteBuffer byteBuffer) { argument
35 errorMsg.mNlMsgErr = StructNlMsgErr.parse(byteBuffer);
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
H A DByteArrayHelpers.java167 ByteBuffer byteBuffer = ByteBuffer.allocate(numbers.length * (Double.SIZE / Byte.SIZE))
177 byteBuffer.putInt((Integer)value);
179 byteBuffer.putFloat((Float)value);
181 byteBuffer.putDouble((Double)value);
183 byteBuffer.putShort((Short)value);
185 byteBuffer.putLong((Long)value);
187 byteBuffer.put((Byte)value);
197 if (numbers.length != 0 && byteBuffer.position() < numbers.length) {
200 numbers.length, byteBuffer.position()));
203 byteBuffer
[all...]
/frameworks/base/tests/net/java/android/net/netlink/
H A DRtNetlinkNeighborMessageTest.java141 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_DELNEIGH);
142 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing.
143 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer);
168 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_NEWNEIGH);
169 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing.
170 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer);
195 final ByteBuffer byteBuffer = ByteBuffer.wrap(RTM_GETNEIGH_RESPONSE);
196 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing.
199 while (byteBuffer.remaining() > 0) {
200 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer);
[all...]
H A DNetlinkErrorMessageTest.java59 final ByteBuffer byteBuffer = ByteBuffer.wrap(NLM_ERROR_OK);
60 byteBuffer.order(ByteOrder.LITTLE_ENDIAN); // For testing.
61 final NetlinkMessage msg = NetlinkMessage.parse(byteBuffer);
/frameworks/base/media/mca/filterpacks/java/android/filterpacks/base/
H A DInputStreamSource.java64 ByteBuffer byteBuffer = null;
75 byteBuffer = ByteBuffer.wrap(byteStream.toByteArray());
84 output.setData(byteBuffer);
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
H A DColorfulnessFilter.java58 ByteBuffer byteBuffer = histogramFrame.lockBytes(Frame.MODE_READ);
59 byteBuffer.order(ByteOrder.nativeOrder());
60 FloatBuffer histogramBuffer = byteBuffer.asFloatBuffer();
/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/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/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/base/packages/services/Proxy/src/com/android/proxyhandler/
H A DProxyServer.java228 int byteBuffer = inputStream.read();
229 if (byteBuffer < 0) return "";
231 if (byteBuffer != '\r') {
232 buffer.append((char)byteBuffer);
234 byteBuffer = inputStream.read();
235 } while ((byteBuffer != '\n') && (byteBuffer >= 0));
/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 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;
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
/frameworks/base/media/jni/
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/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/opt/telephony/src/java/com/android/internal/telephony/
H A DVisualVoicemailSmsFilter.java277 ByteBuffer byteBuffer = ByteBuffer.wrap(message.getUserData());
279 body = decoder.decode(byteBuffer).toString();

Completed in 616 milliseconds

12