Package org.apache.thrift.protocol

Examples of org.apache.thrift.protocol.TProtocol.writeByte()


  }
 
  public static void testNakedByte() throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeByte((byte)123);
    byte out = proto.readByte();
    if (out != 123) {
      throw new RuntimeException("Byte was supposed to be " + (byte)123 + " but was " + out);
    }
  }
View Full Code Here


        TProtocol headerProtocol = protocolFactory.getProtocol( headerTransport );

        headerProtocol.writeI16( magic );
        headerProtocol.writeI32( Integer.MAX_VALUE );
        headerProtocol.writeI16( Short.MAX_VALUE );
        headerProtocol.writeByte( version );
        headerProtocol.writeString( serviceName );
        headerProtocol.writeI64( id );
        headerProtocol.getTransport().flush();

        out.writeI16( magic );
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.