本文整理汇总了Java中org.telegram.tl.TLContext类的典型用法代码示例。如果您正苦于以下问题:Java TLContext类的具体用法?Java TLContext怎么用?Java TLContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TLContext类属于org.telegram.tl包,在下文中一共展示了TLContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
flags = StreamingUtils.readInt(stream);
if ((flags & FLAG_INBOX_DATE) != 0) {
inboxDate = StreamingUtils.readInt(stream);
}
this.type = StreamingUtils.readTLString(stream);
this.message = StreamingUtils.readTLString(stream);
this.media = StreamingUtils.readTLObject(stream, context, TLAbsMessageMedia.class);
this.entities = StreamingUtils.readTLVector(stream, context, TLAbsMessageEntity.class);
}
示例2: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
public TLMessagesChatFull deserializeResponse(InputStream stream, TLContext context)
throws IOException {
final TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null) {
throw new IOException("Unable to parse response");
}
if ((res instanceof TLMessagesChatFull)) {
return (TLMessagesChatFull) res;
}
throw new IOException("Incorrect response type. Expected " + TLMessagesChatFull.class.getName() +", got: " + res.getClass().getName());
}
示例3: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.userId = StreamingUtils.readInt(stream);
this.date = StreamingUtils.readInt(stream);
this.photo = ((TLAbsUserProfilePhoto) StreamingUtils.readTLObject(stream, context));
this.previous = StreamingUtils.readTLBool(stream);
}
示例4: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
@Override
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.count = StreamingUtils.readInt(stream);
this.messages = (TLVector<TLAbsMessage>) StreamingUtils.readTLVector(stream, context);
this.chats = (TLVector<TLAbsChat>) StreamingUtils.readTLVector(stream, context);
this.users = (TLVector<TLAbsUser>) StreamingUtils.readTLVector(stream, context);
}
示例5: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
flags = StreamingUtils.readInt(stream);
peer = StreamingUtils.readTLObject(stream, context, TLAbsInputPeer.class);
id = StreamingUtils.readInt(stream);
userId = StreamingUtils.readTLObject(stream, context, TLAbsInputUser.class);
score = StreamingUtils.readInt(stream);
}
示例6: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
@Override
public TLPaymentsValidatedRequestedInfo deserializeResponse(InputStream stream, TLContext context) throws IOException {
final TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null) {
throw new IOException("Unable to parse response");
}
if ((res instanceof TLPaymentsValidatedRequestedInfo)) {
return (TLPaymentsValidatedRequestedInfo) res;
}
throw new IOException("Incorrect response type. Expected " + TLPaymentsValidatedRequestedInfo.class.getName() +
", got: " + res.getClass().getCanonicalName());
}
示例7: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.peer = (TLAbsPeer) StreamingUtils.readTLObject(stream, context);
this.maxId = StreamingUtils.readInt(stream);
this.pts = StreamingUtils.readInt(stream);
this.ptsCount = StreamingUtils.readInt(stream);
}
示例8: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
@Override
public void deserializeBody(InputStream stream, TLContext context) throws IOException {
flags = StreamingUtils.readInt(stream);
hash = StreamingUtils.readTLString(stream);
if ((flags & FLAG_ALLOW_FLASHCALL) != 0) {
currentNumber = StreamingUtils.readTLBool(stream);
}
}
示例9: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
@Override
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.thumb = StreamingUtils.readTLBytes(stream, context);
this.thumbW = StreamingUtils.readInt(stream);
this.thumbH = StreamingUtils.readInt(stream);
this.w = StreamingUtils.readInt(stream);
this.h = StreamingUtils.readInt(stream);
this.size = StreamingUtils.readInt(stream);
this.key = StreamingUtils.readTLBytes(stream, context);
this.iv = StreamingUtils.readTLBytes(stream, context);
}
示例10: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.flags = StreamingUtils.readInt(stream);
this.channel = StreamingUtils.readTLObject(stream, context, TLAbsInputChannel.class);
this.filter = StreamingUtils.readTLObject(stream, context, TLAbsChannelMessagesFilter.class);
this.pts = StreamingUtils.readInt(stream);
this.limit = StreamingUtils.readInt(stream);
}
示例11: deserializeBody
import org.telegram.tl.TLContext; //导入依赖的package包/类
public void deserializeBody(InputStream stream, TLContext context)
throws IOException {
this.id = StreamingUtils.readInt(stream);
this.critical = StreamingUtils.readTLBool(stream);
this.url = StreamingUtils.readTLString(stream);
this.text = StreamingUtils.readTLString(stream);
}
示例12: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
public TLContactsLink deserializeResponse(InputStream stream, TLContext context)
throws IOException {
TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null)
throw new IOException("Unable to parse response");
if ((res instanceof TLContactsLink))
return (TLContactsLink) res;
throw new IOException("Incorrect response type. Expected org.telegram.api.contacts.TLLink, got: " + res.getClass().getCanonicalName());
}
示例13: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
public TLAuthorization deserializeResponse(InputStream stream, TLContext context)
throws IOException {
TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null)
throw new IOException("Unable to parse response");
if ((res instanceof TLAuthorization))
return (TLAuthorization) res;
throw new IOException("Incorrect response type. Expected org.telegram.api.auth.TLAuthorization, got: " + res.getClass().getCanonicalName());
}
示例14: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
public TLAbsUpdatesChannelDifferences deserializeResponse(InputStream stream, TLContext context)
throws IOException {
final TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null) {
throw new IOException("Unable to parse response");
}
if ((res instanceof TLAbsUpdatesChannelDifferences)) {
return (TLAbsUpdatesChannelDifferences) res;
}
throw new IOException("Incorrect response type. Expected " + TLAbsUpdatesChannelDifferences.class.getName() + ", got: " + res.getClass().getCanonicalName());
}
示例15: deserializeResponse
import org.telegram.tl.TLContext; //导入依赖的package包/类
public TLBool deserializeResponse(InputStream stream, TLContext context)
throws IOException {
TLObject res = StreamingUtils.readTLObject(stream, context);
if (res == null)
throw new IOException("Unable to parse response");
if ((res instanceof TLBool))
return (TLBool) res;
throw new IOException("Incorrect response type. Expected org.telegram.tl.TLBool, got: " + res.getClass().getCanonicalName());
}