Lines Matching defs:byteBuffer
77 public static boolean hasAvailableSpace(ByteBuffer byteBuffer) {
78 return byteBuffer != null && byteBuffer.remaining() >= STRUCT_SIZE;
81 public static StructNlMsgHdr parse(ByteBuffer byteBuffer) {
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.getInt();
115 public void pack(ByteBuffer byteBuffer) {
119 byteBuffer.putInt(nlmsg_len);
120 byteBuffer.putShort(nlmsg_type);
121 byteBuffer.putShort(nlmsg_flags);
122 byteBuffer.putInt(nlmsg_seq);
123 byteBuffer.putInt(nlmsg_pid);