1 package com.android.server.wifi.anqp; 2 3 import com.android.server.wifi.hotspot2.Utils; 4 5 import java.nio.ByteBuffer; 6 7 /** 8 * ANQP Element to hold a raw, unparsed, octet blob 9 */ 10 public class GenericBlobElement extends ANQPElement { 11 private final byte[] mData; 12 13 public GenericBlobElement(Constants.ANQPElementType infoID, ByteBuffer payload) { 14 super(infoID); 15 mData = new byte[payload.remaining()]; 16 payload.get(mData); 17 } 18 19 public byte[] getData() { 20 return mData; 21 } 22 23 @Override 24 public String toString() { 25 return "Element ID " + getID() + ": " + Utils.toHexString(mData); 26 } 27 } 28