@Override public void parse(BserValues values) throws IOException { this.w = values.getInt(1); this.h = values.getInt(2); if (values.hasRemaining()) { setUnmappedObjects(values.buildRemaining()); } }
@Override public void parse(BserValues values) throws IOException { this.nextOffset = values.optBytes(1); this.limit = values.getInt(2); this.optimizations = new ArrayList<ApiUpdateOptimization>(); for (int b : values.getRepeatedInt(3)) { optimizations.add(ApiUpdateOptimization.parse(b)); } }
public static ApiTextMessageEx fromBytes(byte[] src) throws IOException { BserValues values = new BserValues(BserParser.deserialize(new DataInput(src, 0, src.length))); int key = values.getInt(1); byte[] content = values.getBytes(2); switch (key) { case 1: return Bser.parse(new ApiTextExMarkdown(), content); case 2: return Bser.parse(new ApiTextModernMessage(), content); case 3: return Bser.parse(new ApiTextCommand(), content); default: return new ApiTextMessageExUnsupported(key, content); } }
@Override public void parse(BserValues values) throws IOException { this.bannerId = values.getInt(1); this.viewDuration = values.getInt(2); }
@Override public void parse(BserValues values) throws IOException { this.uid = values.getInt(1); this.accessHash = values.getLong(2); }
@Override public void parse(BserValues values) throws IOException { this.groupId = values.getInt(1); this.ext = values.optObj(2, new ApiMapValue()); }
@Override public void parse(BserValues values) throws IOException { this.timeout = values.getInt(1); }
@Override public void parse(BserValues values) throws IOException { this.color = ApiColors.parse(values.getInt(1)); }