QoS qos = qos();
if(qos != QoS.AT_MOST_ONCE) {
messageId = is.readShort();
}
ArrayList<Topic> list = new ArrayList<Topic>();
while(is.available() > 0) {
Topic topic = new Topic(MessageSupport.readUTF(is), QoS.values()[is.readByte()]);
list.add(topic);
}
topics = list.toArray(new Topic[list.size()]);
return this;