Examples of BitArray


Examples of org.apache.tajo.util.BitArray

      buffer = ByteBuffer.allocateDirect(65535);

      // comput the number of bytes, representing the null flags

      nullFlags = new BitArray(schema.getColumnNum());
      headerSize = RECORD_SIZE + 2 + nullFlags.bytesLength();

      if (enabledStats) {
        this.stats = new TableStatistics(this.schema);
      }
View Full Code Here

Examples of org.apache.tajo.util.BitArray

      SYNC_INTERVAL =
          conf.getInt(ConfVars.RAWFILE_SYNC_INTERVAL.varname,
              SYNC_SIZE * 100);
      numBitsOfNullFlags = (int) Math.ceil(((double)schema.getColumnNum()));
      nullFlags = new BitArray(numBitsOfNullFlags);
      tupleHeaderSize = nullFlags.bytesLength() + (2 * Short.SIZE/8);
      this.start = fragment.getStartOffset();
      this.end = this.start + fragment.getLength();
    }
View Full Code Here

Examples of org.apache.tajo.util.BitArray

      tuple = new VTuple(schema.getColumnNum());

      int nullFlagSize = buffer.getShort();
      byte[] nullFlagBytes = new byte[nullFlagSize];
      buffer.get(nullFlagBytes, 0, nullFlagSize);
      nullFlags = new BitArray(nullFlagBytes);
      int tupleSize = buffer.getShort();

      while (buffer.remaining() < (tupleSize)) {
        if (fillBuffer() < 0) {
          return null;
View Full Code Here

Examples of org.apache.tajo.util.BitArray

      writeHeader();

      buffer = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE);

      numBitsOfNullFlags = (int) Math.ceil(((double)schema.getColumnNum()));
      nullFlags = new BitArray(numBitsOfNullFlags);

      if (enabledStats) {
        this.stats = new TableStatistics(this.schema);
      }
    }
View Full Code Here

Examples of org.codehaus.activemq.util.BitArray

        msg.setJMSClientID(super.readUTF(dataIn));
        msg.setProducerID(super.readUTF(dataIn));
        msg.setJMSDestination(ActiveMQDestination.readFromStream(dataIn));
        msg.setJMSDeliveryMode(dataIn.readByte());
        msg.setJMSPriority(dataIn.readByte());
        BitArray ba = msg.getBitArray();
    
        msg.setJMSRedelivered(ba.get(ActiveMQMessage.REDELIVERED_INDEX));
        msg.setXaTransacted(ba.get(ActiveMQMessage.XA_TRANS_INDEX));

        if (ba.get(ActiveMQMessage.CORRELATION_INDEX)) {
            msg.setJMSCorrelationID(super.readUTF(dataIn));
        }
        if (ba.get(ActiveMQMessage.TYPE_INDEX)) {
            msg.setJMSType(super.readUTF(dataIn));
        }
        if (ba.get(ActiveMQMessage.BROKER_NAME_INDEX)) {
            msg.setEntryBrokerName(super.readUTF(dataIn));
        }
        if (ba.get(ActiveMQMessage.CLUSTER_NAME_INDEX)) {
            msg.setEntryClusterName(super.readUTF(dataIn));
        }
        if (ba.get(ActiveMQMessage.TRANSACTION_ID_INDEX)) {
            msg.setTransactionId(super.readUTF(dataIn));
        }
        if (ba.get(ActiveMQMessage.REPLY_TO_INDEX)) {
            msg.setJMSReplyTo(ActiveMQDestination.readFromStream(dataIn));
        }
        if (ba.get(ActiveMQMessage.TIMESTAMP_INDEX)) {
            msg.setJMSTimestamp(dataIn.readLong());
        }
        if (ba.get(ActiveMQMessage.EXPIRATION_INDEX)) {
            msg.setJMSExpiration(dataIn.readLong());
        }
        if (ba.get(ActiveMQMessage.CID_INDEX)) {
            int cidlength = dataIn.readShort();
            if (cidlength > 0) {
                int[] cids = new int[cidlength];
                for (int i = 0; i < cids.length; i++) {
                    cids[i] = dataIn.readShort();
                }
                msg.setConsumerNos(cids);
            }
        }
        if (ba.get(ActiveMQMessage.PROPERTIES_INDEX)) {
            msg.setProperties(msg.readMapProperties(dataIn));
        }
        if (ba.get(ActiveMQMessage.PAYLOAD_INDEX)) {
            int payloadLength = dataIn.readInt();
            if (payloadLength >= 0) {
                byte[] payload = new byte[payloadLength];
                dataIn.readFully(payload);
                msg.setBodyAsBytes(payload);
View Full Code Here

Examples of sun.security.util.BitArray

    public KerberosFlags(int length) throws IllegalArgumentException {
        bits = new BitArray(length);
    }

    public KerberosFlags(int length, byte[] a) throws IllegalArgumentException {
        bits = new BitArray(length, a);
        if (length != Krb5.KRB_FLAGS_MAX+1) {
            bits = new BitArray(Arrays.copyOf(bits.toBooleanArray(), Krb5.KRB_FLAGS_MAX+1));
        }
    }
View Full Code Here

Examples of util.BitArray

  }

  // code and decode dos ids
  public BitArray encode(BitArray bt) {
    if (bt == null) {
      bt = new BitArray();
    }

    if (this.isLeaf && this.value == 0) {//System.out.println("id enc a1");
      bt.addbits(0, 3);
    } else if (this.isLeaf && this.value == 1) {//System.out.println("id enc a2");
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.