예제 #1
0
 public static com.x.protobuf.Bug11.C parseFrom(java.io.InputStream is, int offset, int length)
     throws java.io.IOException {
   CurrentCursor cursor = new CurrentCursor();
   cursor.addToPosition(offset);
   cursor.setProcessUpToPosition(offset + length);
   return parseFrom(is, cursor);
 }
예제 #2
0
 public static com.x.protobuf.Bug11.B parseFrom(byte[] data, int offset, int length)
     throws java.io.IOException {
   CurrentCursor cursor = new CurrentCursor();
   cursor.addToPosition(offset);
   cursor.setProcessUpToPosition(offset + length);
   return parseFrom(data, cursor);
 }
예제 #3
0
 public static com.x.protobuf.Bug11.A parseFrom(byte[] data, CurrentCursor cursor)
     throws java.io.IOException {
   com.x.protobuf.Bug11.A message = new com.x.protobuf.Bug11.A();
   while (true) {
     if (ProtobufInputStream.isAtEnd(data, cursor)) {
       return message;
     }
     int varint = ProtobufInputStream.readRawVarint32(data, cursor);
     int tag = ProtobufInputStream.getTagFieldNumber(varint);
     switch (tag) {
       case 0:
         return message;
       default:
         ProtobufInputStream.skipUnknown(varint, data, cursor);
         break;
       case 32904:
         if (message.getEntry() == null || message.getEntry().isEmpty()) {
           message.setEntry(new java.util.ArrayList<com.x.protobuf.Bug11.B>());
         }
         int lengthEntry = ProtobufInputStream.readRawVarint32(data, cursor);
         message
             .getEntry()
             .add(
                 com.x.protobuf.Bug11.BSerializer.parseFrom(
                     data, cursor.getCurrentPosition(), lengthEntry));
         cursor.addToPosition(lengthEntry);
         break;
       case 32902:
         message.setEntry2(ProtobufInputStream.readInt32(data, cursor));
         break;
     }
   }
 }
예제 #4
0
 public static com.x.protobuf.Bug11.B parseFrom(java.io.InputStream is, CurrentCursor cursor)
     throws java.io.IOException {
   com.x.protobuf.Bug11.B message = new com.x.protobuf.Bug11.B();
   while (true) {
     if (cursor.getCurrentPosition() == cursor.getProcessUpToPosition()) {
       return message;
     }
     int varint = ProtobufInputStream.readRawVarint32(is, cursor);
     int tag = ProtobufInputStream.getTagFieldNumber(varint);
     if (ProtobufInputStream.isAtEnd(cursor)) {
       return message;
     }
     switch (tag) {
       case 0:
         return message;
       default:
         ProtobufInputStream.skipUnknown(varint, is, cursor);
         break;
       case 1:
         message.setVal(ProtobufInputStream.readString(is, cursor));
         break;
       case 2:
         int lengthCval = ProtobufInputStream.readRawVarint32(is, cursor);
         message.setCval(
             com.x.protobuf.Bug11.CSerializer.parseFrom(
                 is, cursor.getCurrentPosition(), lengthCval));
         cursor.addToPosition(lengthCval);
         break;
       case 3:
         if (message.getResult() == null || message.getResult().isEmpty()) {
           message.setResult(new java.util.ArrayList<com.x.protobuf.Bug11.B.Result>());
         }
         com.x.protobuf.Bug11.B.Result tempResult =
             com.x.protobuf.Bug11.B.ResultSerializer.parseFrom(is, cursor);
         message.getResult().add(tempResult);
         break;
     }
   }
 }
예제 #5
0
 public static com.x.protobuf.Bug11.B.Result parseFrom(
     java.io.InputStream is, CurrentCursor cursor) throws java.io.IOException {
   com.x.protobuf.Bug11.B.Result message = new com.x.protobuf.Bug11.B.Result();
   while (true) {
     if (cursor.getCurrentPosition() == cursor.getProcessUpToPosition()) {
       return message;
     }
     int varint = ProtobufInputStream.readRawVarint32(is, cursor);
     int tag = ProtobufInputStream.getTagFieldNumber(varint);
     if (ProtobufInputStream.isAtEnd(cursor)) {
       return message;
     }
     int wireType = varint & ProtobufInputStream.TAG_TYPE_MASK;
     if (wireType == ProtobufInputStream.WIRETYPE_GROUP_END) {
       return message;
     }
     switch (tag) {
       case 0:
         return message;
       default:
         ProtobufInputStream.skipUnknown(varint, is, cursor);
         break;
       case 2:
         message.setUrl(ProtobufInputStream.readString(is, cursor));
         break;
       case 3:
         message.setTitle(ProtobufInputStream.readString(is, cursor));
         break;
       case 4:
         if (message.getSnippets() == null || message.getSnippets().isEmpty()) {
           message.setSnippets(new java.util.ArrayList<String>());
         }
         message.getSnippets().add(ProtobufInputStream.readString(is, cursor));
         break;
     }
   }
 }
예제 #6
0
 public static com.x.protobuf.Bug11.C parseFrom(java.io.InputStream is, CurrentCursor cursor)
     throws java.io.IOException {
   com.x.protobuf.Bug11.C message = new com.x.protobuf.Bug11.C();
   while (true) {
     if (cursor.getCurrentPosition() == cursor.getProcessUpToPosition()) {
       return message;
     }
     int varint = ProtobufInputStream.readRawVarint32(is, cursor);
     int tag = ProtobufInputStream.getTagFieldNumber(varint);
     if (ProtobufInputStream.isAtEnd(cursor)) {
       return message;
     }
     switch (tag) {
       case 0:
         return message;
       default:
         ProtobufInputStream.skipUnknown(varint, is, cursor);
         break;
       case 1:
         message.setVal(ProtobufInputStream.readString(is, cursor));
         break;
     }
   }
 }