Ejemplo n.º 1
0
 @Override
 public void serialize(BserWriter writer) throws IOException {
   if (this.text == null) {
     throw new IOException();
   }
   writer.writeString(1, this.text);
 }
Ejemplo n.º 2
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));
     }
   }
 }