Examples of readI16()


Examples of org.apache.thrift.protocol.TBinaryProtocol.readI16()

        if ( bis.markSupported() ) {
            bis.mark( 0 );
        }

        // magic
        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );

        // message length
        int messageLength = protocol.readI32();
        Assert.assertEquals( messageLength + 4, bytes.length );
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.readI16()

        // message length
        int messageLength = protocol.readI32();
        Assert.assertEquals( messageLength + 4, bytes.length );

        // header length
        short headerLength = protocol.readI16();
        // version
        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        // service name
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
        // dubbo request id
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.readI16()

        }

        TIOStreamTransport transport = new TIOStreamTransport( bis );
        TBinaryProtocol protocol = new TBinaryProtocol( transport );

        Assert.assertEquals( ThriftCodec.MAGIC, protocol.readI16() );
        Assert.assertEquals( protocol.readI32() + 4, bos.writerIndex() );
        int headerLength = protocol.readI16();

        Assert.assertEquals( ThriftCodec.VERSION, protocol.readByte() );
        Assert.assertEquals( Demo.Iface.class.getName(), protocol.readString() );
View Full Code Here

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

  public static void testNakedI16(short n) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeI16(n);
    // System.out.println(buf.inspect());
    int out = proto.readI16();
    if (out != n) {
      throw new RuntimeException("I16 was supposed to be " + n + " but was " + out);
    }
  }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

      if (incoming.get(0)) {
        struct.ipv4 = iprot.readI32();
        struct.setIpv4IsSet(true);
      }
      if (incoming.get(1)) {
        struct.port = iprot.readI16();
        struct.setPortIsSet(true);
      }
      if (incoming.get(2)) {
        struct.service_name = iprot.readString();
        struct.setService_nameIsSet(true);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

      if (incoming.get(0)) {
        struct.constrainClass = iprot.readString();
        struct.setConstrainClassIsSet(true);
      }
      if (incoming.get(1)) {
        struct.violationCode = iprot.readI16();
        struct.setViolationCodeIsSet(true);
      }
      if (incoming.get(2)) {
        struct.violationDescription = iprot.readString();
        struct.setViolationDescriptionIsSet(true);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

      if (incoming.get(0)) {
        struct.constrainClass = iprot.readString();
        struct.setConstrainClassIsSet(true);
      }
      if (incoming.get(1)) {
        struct.violationCode = iprot.readI16();
        struct.setViolationCodeIsSet(true);
      }
      if (incoming.get(2)) {
        struct.violationDescription = iprot.readString();
        struct.setViolationDescriptionIsSet(true);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, Node struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(4);
      if (incoming.get(0)) {
        struct.nodeId = iprot.readI16();
        struct.setNodeIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.domainId = iprot.readI16();
        struct.setDomainIdIsSet(true);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

      if (incoming.get(0)) {
        struct.nodeId = iprot.readI16();
        struct.setNodeIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.domainId = iprot.readI16();
        struct.setDomainIdIsSet(true);
      }
      if (incoming.get(2)) {
        struct.hostname = iprot.readString();
        struct.setHostnameIsSet(true);
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.readI16()

      struct.header = new AsyncMessageHeader();
      struct.header.read(iprot);
      struct.setHeaderIsSet(true);
      BitSet incoming = iprot.readBitSet(3);
      if (incoming.get(0)) {
        struct.nodeId = iprot.readI16();
        struct.setNodeIdIsSet(true);
      }
      if (incoming.get(1)) {
        struct.authScheme = AuthScheme.findByValue(iprot.readI32());
        struct.setAuthSchemeIsSet(true);
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.