Examples of readBinary()


Examples of Framework.MemoryStream.readBinary()

            dataWire = this.convertMemoryStream(this, this.data, false);

            int streamOffset = dataWire.getOffset();
            dataWire.open(true);
            dataWire.seek(0);
            dataWire.readBinary(binData);
            dataWire.seek(streamOffset);
            dataWire.close();
        }

        return binData;
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.readBinary()

      TTupleProtocol iprot = (TTupleProtocol) prot;
      struct.dbName = iprot.readString();
      struct.setDbNameIsSet(true);
      struct.tblName = iprot.readString();
      struct.setTblNameIsSet(true);
      struct.expr = iprot.readBinary();
      struct.setExprIsSet(true);
      BitSet incoming = iprot.readBitSet(2);
      if (incoming.get(0)) {
        struct.defaultPartitionName = iprot.readString();
        struct.setDefaultPartitionNameIsSet(true);
View Full Code Here

Examples of com.facebook.thrift.protocol.TProtocol.readBinary()

  public static void testNakedBinary(byte[] data) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeBinary(data);
    // System.out.println(buf.inspect());
    byte[] out = proto.readBinary();
    if (!Arrays.equals(data, out)) {
      throw new RuntimeException("Binary was supposed to be '" + data + "' but was '" + out + "'");
    }
  }
View Full Code Here

Examples of org.apache.qpid.proton.TestDecoder.readBinary()

    @Test
    public void testStrings() throws IOException
    {
        TestDecoder d = createDecoder(getBytes("strings"));
        assertEquals(new Binary("abc\0defg".getBytes("UTF-8")), d.readBinary());
        assertEquals("abcdefg", d.readString());
        assertEquals(Symbol.valueOf("abcdefg"), d.readSymbol());
        assertEquals(new Binary(new byte[0]), d.readBinary());
        assertEquals("", d.readString());
        assertEquals(Symbol.valueOf(""), d.readSymbol());
View Full Code Here

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

  public static void testNakedBinary(byte[] data) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeBinary(data);
    // System.out.println(buf.inspect());
    byte[] out = proto.readBinary();
    if (!Arrays.equals(data, out)) {
      throw new RuntimeException("Binary was supposed to be '" + data + "' but was '" + out + "'");
    }
  }
View Full Code Here

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

      if (incoming.get(0)) {
        struct.key = iprot.readString();
        struct.setKeyIsSet(true);
      }
      if (incoming.get(1)) {
        struct.value = iprot.readBinary();
        struct.setValueIsSet(true);
      }
      if (incoming.get(2)) {
        struct.annotation_type = AnnotationType.findByValue(iprot.readI32());
        struct.setAnnotation_typeIsSet(true);
View Full Code Here

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

    @Override
    public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException {
      TTupleProtocol iprot = (TTupleProtocol) prot;
      BitSet incoming = iprot.readBitSet(9);
      if (incoming.get(0)) {
        struct.startRow = iprot.readBinary();
        struct.setStartRowIsSet(true);
      }
      if (incoming.get(1)) {
        struct.stopRow = iprot.readBinary();
        struct.setStopRowIsSet(true);
View Full Code Here

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

      if (incoming.get(0)) {
        struct.startRow = iprot.readBinary();
        struct.setStartRowIsSet(true);
      }
      if (incoming.get(1)) {
        struct.stopRow = iprot.readBinary();
        struct.setStopRowIsSet(true);
      }
      if (incoming.get(2)) {
        {
          org.apache.thrift.protocol.TList _list81 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
View Full Code Here

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

        struct.timeRange = new TTimeRange();
        struct.timeRange.read(iprot);
        struct.setTimeRangeIsSet(true);
      }
      if (incoming.get(6)) {
        struct.filterString = iprot.readBinary();
        struct.setFilterStringIsSet(true);
      }
      if (incoming.get(7)) {
        struct.batchSize = iprot.readI32();
        struct.setBatchSizeIsSet(true);
View Full Code Here

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

          struct.attributes = new HashMap<ByteBuffer,ByteBuffer>(2*_map84.size);
          for (int _i85 = 0; _i85 < _map84.size; ++_i85)
          {
            ByteBuffer _key86; // required
            ByteBuffer _val87; // optional
            _key86 = iprot.readBinary();
            _val87 = iprot.readBinary();
            struct.attributes.put(_key86, _val87);
          }
        }
        struct.setAttributesIsSet(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.