16a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvistpackage com.android.server.wifi.anqp; 26a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist 371a988c8e9859244b83cd55bb6b6ee913fcaf95cJan Nordqvistimport com.android.server.wifi.hotspot2.Utils; 471a988c8e9859244b83cd55bb6b6ee913fcaf95cJan Nordqvist 56a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvistimport java.nio.ByteBuffer; 66a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist 76a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist/** 86a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist * ANQP Element to hold a raw, unparsed, octet blob 96a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist */ 106a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvistpublic class GenericBlobElement extends ANQPElement { 116a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist private final byte[] mData; 126a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist 136a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist public GenericBlobElement(Constants.ANQPElementType infoID, ByteBuffer payload) { 146a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist super(infoID); 156a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist mData = new byte[payload.remaining()]; 166a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist payload.get(mData); 176a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist } 186a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist 196a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist public byte[] getData() { 206a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist return mData; 216a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist } 226a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist 236a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist @Override 246a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist public String toString() { 2571a988c8e9859244b83cd55bb6b6ee913fcaf95cJan Nordqvist return "Element ID " + getID() + ": " + Utils.toHexString(mData); 266a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist } 276a3903fed590e369b576bddbe1ae2d788768ddfeJan Nordqvist} 28