Package org.infinispan.protostream.impl

Examples of org.infinispan.protostream.impl.ProtoStreamWriterImpl


   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
      if (t == null) {
         throw new IllegalArgumentException("Object to marshall cannot be null");
      }
      ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl(ctx);
      writer.write(out, t);
   }
View Full Code Here


         // try to use a message marshaller
         BaseMarshaller marshaller = ctx.getMarshaller(t.getClass());
         out.writeString(wrappedDescriptorFullName, marshaller.getTypeName());

         ByteArrayOutputStream buffer = new ByteArrayOutputStream();      //todo [anistor] here we should use a better buffer allocation strategy
         ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl(ctx);
         writer.write(CodedOutputStream.newInstance(buffer), t);

         out.writeTag(wrappedMessageBytes, WireFormat.WIRETYPE_LENGTH_DELIMITED);
         out.writeRawVarint32(buffer.size());
         out.writeRawBytes(buffer.toByteArray());
      }
View Full Code Here

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
      if (t == null) {
         throw new IllegalArgumentException("Object to marshall cannot be null");
      }
      ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl(ctx);
      writer.write(out, t);
   }
View Full Code Here

         // try to use a message marshaller
         BaseMarshaller marshaller = ctx.getMarshaller(t.getClass());
         out.writeString(wrappedDescriptorFullName, marshaller.getFullName());

         ByteArrayOutputStream buffer = new ByteArrayOutputStream();      //todo [anistor] here we should use a better buffer allocation strategy
         ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl(ctx);
         writer.write(CodedOutputStream.newInstance(buffer), t);

         out.writeTag(wrappedMessageBytes, WireFormat.WIRETYPE_LENGTH_DELIMITED);
         out.writeRawVarint32(buffer.size());
         out.writeRawBytes(buffer.toByteArray());
      }
View Full Code Here

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
      if (t == null) {
         throw new IllegalArgumentException("Object to marshall cannot be null");
      }
      ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl((SerializationContextImpl) ctx);
      writer.write(out, t);
   }
View Full Code Here

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
      if (t == null) {
         throw new IllegalArgumentException("Object to marshall cannot be null");
      }
      ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl((SerializationContextImpl) ctx);
      writer.write(out, t);
   }
View Full Code Here

   public static <A> void writeTo(SerializationContext ctx, CodedOutputStream out, A t) throws IOException {
      if (t == null) {
         throw new IllegalArgumentException("Object to marshall cannot be null");
      }
      ProtoStreamWriterImpl writer = new ProtoStreamWriterImpl((SerializationContextImpl) ctx);
      writer.write(out, t);
   }
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.impl.ProtoStreamWriterImpl

Copyright © 2018 www.massapicom. 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.