Package org.infinispan.protostream

Examples of org.infinispan.protostream.UnknownFieldSet.writeTo()


      }
      if (value instanceof Message) {
         UnknownFieldSet unknownFieldSet = ((Message) value).getUnknownFieldSet();
         if (unknownFieldSet != null) {
            // TODO check that the unknown field set does not contains fields that have already been written or fields that are actually known already
            unknownFieldSet.writeTo(messageContext.out);
         }
      }
   }

   private void resetContext() {
View Full Code Here


      }
      if (value instanceof Message) {
         UnknownFieldSet unknownFieldSet = ((Message) value).getUnknownFieldSet();
         if (unknownFieldSet != null) {
            // TODO check that the unknown field set does not contains fields that have already been written or fields that are actually known already
            unknownFieldSet.writeTo(messageContext.out);
         }
      }
   }

   private void resetContext() {
View Full Code Here

               if (unknownFieldSet.hasTag(WireFormat.makeTag(fd.getNumber(), fd.getLiteType().getWireType()))) {
                  throw new IOException("Field " + fd.getFullName() + " is a known field so it is illegal to be present in the unknown field set");
               }
            }
            // write the unknown fields
            unknownFieldSet.writeTo(messageContext.out);
         }
      }

      UnknownFieldSet unknownFieldSet = value instanceof Message ? ((Message) value).getUnknownFieldSet() : null;
View Full Code Here

      UnknownFieldSet unknownFieldSet = new UnknownFieldSetImpl();
      unknownFieldSet.readAllFields(codedInputStream);

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      CodedOutputStream out = CodedOutputStream.newInstance(baos);
      unknownFieldSet.writeTo(out);
      byte[] bytes2 = baos.toByteArray();

      assertArrayEquals(bytes, bytes2);
   }
}
View Full Code Here

      UnknownFieldSet unknownFieldSet = new UnknownFieldSetImpl();
      unknownFieldSet.readAllFields(codedInputStream);

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      CodedOutputStream out = CodedOutputStream.newInstance(baos);
      unknownFieldSet.writeTo(out);
      byte[] bytes2 = baos.toByteArray();

      assertArrayEquals(bytes, bytes2);
   }
}
View Full Code Here

      marshaller.writeTo(this, value);
      if (value instanceof Message) {
         UnknownFieldSet unknownFieldSet = ((Message) value).getUnknownFieldSet();
         if (unknownFieldSet != null) {
            // TODO check that the unknown field set does not contains fields that have already been written or fields that are actually known already
            unknownFieldSet.writeTo(messageContext.out);
         }
      }
   }

   private void resetContext() {
View Full Code Here

               if (unknownFieldSet.hasTag(WireFormat.makeTag(fd.getNumber(), fd.getType().getWireType()))) {
                  throw new IOException("Field " + fd.getFullName() + " is a known field so it is illegal to be present in the unknown field set");
               }
            }
            // write the unknown fields
            unknownFieldSet.writeTo(messageContext.out);
         }
      }

      UnknownFieldSet unknownFieldSet = value instanceof Message ? ((Message) value).getUnknownFieldSet() : null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.