コード例 #1
0
 public byte[] buildContainer() throws IOException {
   DataOutput res = new DataOutput();
   BserWriter writer = new BserWriter(res);
   writer.writeInt(1, getHeader());
   writer.writeBytes(2, toByteArray());
   return res.toByteArray();
 }
コード例 #2
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeInt(1, this.groupId);
   if (this.ext != null) {
     writer.writeObject(2, this.ext);
   }
 }
コード例 #3
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.peer == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.peer);
   writer.writeLong(2, this.startDate);
 }
コード例 #4
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.peer == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.peer);
   writer.writeLong(2, this.rid);
   writer.writeRepeatedObj(3, this.reactions);
 }
コード例 #5
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.nextOffset != null) {
     writer.writeBytes(1, this.nextOffset);
   }
   writer.writeInt(2, this.limit);
   for (ApiUpdateOptimization i : this.optimizations) {
     writer.writeInt(3, i.getValue());
   }
 }
コード例 #6
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.groupPeer == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.groupPeer);
   writer.writeLong(2, this.rid);
   for (ApiUpdateOptimization i : this.optimizations) {
     writer.writeInt(3, i.getValue());
   }
 }
コード例 #7
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeInt(1, this.w);
   writer.writeInt(2, this.h);
   if (this.getUnmappedObjects() != null) {
     SparseArray<Object> unmapped = this.getUnmappedObjects();
     for (int i = 0; i < unmapped.size(); i++) {
       int key = unmapped.keyAt(i);
       writer.writeUnmapped(key, unmapped.get(key));
     }
   }
 }
コード例 #8
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.text == null) {
     throw new IOException();
   }
   writer.writeString(1, this.text);
 }
コード例 #9
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.settings == null) {
     throw new IOException();
   }
   writer.writeObject(1, this.settings);
 }
コード例 #10
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.color == null) {
     throw new IOException();
   }
   writer.writeInt(1, this.color.getValue());
 }
コード例 #11
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.command == null) {
     throw new IOException();
   }
   writer.writeString(1, this.command);
   if (this.args == null) {
     throw new IOException();
   }
   writer.writeString(2, this.args);
   if (this.getUnmappedObjects() != null) {
     SparseArray<Object> unmapped = this.getUnmappedObjects();
     for (int i = 0; i < unmapped.size(); i++) {
       int key = unmapped.keyAt(i);
       writer.writeUnmapped(key, unmapped.get(key));
     }
   }
 }
コード例 #12
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeInt(1, this.bannerId);
   writer.writeInt(2, this.viewDuration);
 }
コード例 #13
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeInt(1, this.uid);
   writer.writeLong(2, this.accessHash);
 }
コード例 #14
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeRepeatedObj(1, this.items);
 }
コード例 #15
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   writer.writeInt(1, this.timeout);
 }