Extracts the value of this bit flag from the supplied byte array
and sets the value in the supplied container.

@param container container
@param data byte array
557767
public void setValue(FieldContainer container, byte[] data)
   {
      if (data != null)
      {
         container.set(m_type, ((MPPUtility.getInt(data, m_offset) & m_mask) == 0) ? m_zeroValue : m_nonZeroValue);
      }
   }
838184
public void setData(byte[] data, boolean append) {
	lastModified = System.currentTimeMillis();

	// set data
	if (append) {
	    if (this.data != null && data != null) {
		byte[] newData = new byte[this.data.length + data.length];
		int i = 0;
		for (; i < this.data.length; i++) {
		    newData[i] = this.data[i];
		}
		for (; i < this.data.length + data.length; i++) {
		    newData[i] = data[i - this.data.length];
		}
		this.data = newData;
	    }
	    else if (data != null) {
		this.data = data;
	    }
	}
	else {
	    this.data = data;
	}

	// set type
	if (this.data != null) this.type = TYPE_FILE;

    }
1203978
public void readArray(float[] data) throws IOException {
        int size = data.length;
        for (int i = 0; i < size; ++i)
            data[i] = getFloat();
    }
560574
public void setCompressedData(byte[] compressedData) {
		if (compressedData != null) {
			this.compressedData = Arrays.copyOf(compressedData, compressedData.length);
		}
	}
234591
public static int count(final byte[] data) {
		int count = 0;
		for (int i = data.length; --i >= 0;) {
			count += count(data[i]);
		}
		return count;
	}
772784
public void updateContainer(IndexedContainer data) {

        m_container.removeAllItems();
        m_container = data;
        setContainerDataSource(m_container);
        setItemIconPropertyId(PROP_ICON);
        setRowHeaderMode(RowHeaderMode.ICON_ONLY);

        setVisibleColumns(PROP_CAPTION, PROP_DESCRIPTION, PROP_OU);
        setColumnWidth(null, 40);
        this.refreshRowCache();

    }
298523
@Override
	public void setData(final Object data) {
		if (isRichTextArea() && data instanceof String) {
			super.setData(sanitizeInputText((String) data));
		} else {
			super.setData(data);
		}
	}
830205
public final void setData(@Nullable Data<?> data) {
        setDatas(data != null ? singleton(data) : Collections.<Data<?>>emptyList());
    }
1359522
private static int[] calculate(byte[] data) {
    int A = 0x67452301;
    int B = 0xEFCDAB89;
    int C = 0x98BADCFE;
    int D = 0x10325476;
    int E = 0xC3D2E1F0;

    int[] W = new int[80]; // working buffer
    int len = data.length;
    int off = 0;
    int   X, i, n = len/4;

    boolean done = false;
    boolean padded = false;

    while( !done ) {
      // Fill W array
      for(i=0; (i<16) && (n > 0); n--, off+=4)
        W[i++] = (data[off+3] & 0xFF) | ((data[off+2] & 0xFF) << 8) |
          ((data[off+1] & 0xFF) << 16) | ((data[off] & 0xFF) << 24);

      if (i < 16) {             // pad
        if( !padded ) {         // first time past end of data
          X=len%4;
          int pad1 = 0;
          for (int j = 0; j < X; ++j) {
            pad1 |= ((int) (data[off + j] & 0xFF)) << (24 - 8 * j);
          }
          W[i++] = pad1 | (1 << (31 - X * 8));
//            W[i++] = (X!=0)?(((int)msbf(data,off,X)<<((4-X)*8))|(1<<(31-X*8))):(1<<31);
          if (i==15) W[15]=0;   // 64 bit length of data as bits can't fit
          padded = true;        // don't pad again if there is another iteration
        }
        if (i <= 14) {          // last iteration
          while( i<14 ) W[i++] = 0;
          // bit count = len*8
          W[14] = len >>> 29;
          W[15] = len << 3;
          done = true;
        }
        i = 16;
      }

      do {
        W[i] = ((X = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16]) << 1) | (X >>> 31);
      } while(++i<80);

      // Transform
      int A0 = A;
      int B0 = B;
      int C0 = C;
      int D0 = D;
      int E0 = E;
      i = 0;
      do { X=((A<<5)|(A>>>27))+((B&C)|(~B&D))+E+W[i]+0x5A827999;
      E=D;D=C;C=(B<<30)|(B>>>2);B=A;A=X; } while(++i<20);
      do { X=((A<<5)|(A>>>27))+(B^C^D)+E+W[i]+0x6ED9EBA1;
      E=D;D=C;C=(B<<30)|(B>>>2);B=A;A=X; } while(++i<40);
      do { X=((A<<5)|(A>>>27))+((B&C)|(B&D)|(C&D))+E+W[i]+0x8F1BBCDC;
      E=D;D=C;C=(B<<30)|(B>>>2);B=A;A=X; } while(++i<60);
      do { X=((A<<5)|(A>>>27))+(B^C^D)+E+W[i]+0xCA62C1D6;
      E=D;D=C;C=(B<<30)|(B>>>2);B=A;A=X; } while(++i<80);
      A += A0;
      B += B0;
      C += C0;
      D += D0;
      E += E0;
    }

    int[] result = {A, B, C, D, E};
    return result;
  }
889666
public void setValueAsJava(final byte[] bytes) {
	if (type.equals(QualifiedName_XSD_BASE64_BINARY)) {
	    this.value=ProvFactory.getFactory().base64Encoding(bytes);
	} else if (type.equals(QualifiedName_XSD_HEX_BINARY)) {
	    this.value=ProvFactory.getFactory().hexEncoding(bytes);
	}
    }
9364
protected function getElementData(
        ContainerInterface $container, &$data = []
    ) {
         foreach ($container as $element) {
             if ($element instanceof InputInterface) {
                 $data[$element->getName()] = $element->getValue();
                 continue;
             }

             if ($element instanceof ContainerInterface) {
                 $this->getElementData($element, $data);
                 continue;
             }
        }
    }
1021785
public void fromBytes(byte[] data) {
        if (data == null || data.length != 4) {
            throw new IllegalArgumentException("invalid header data. It can't be null and the length must be 4 byte.");
        }
        this.packetBodyLength = (data[0] & 0xFF) | ((data[1] & 0xFF) << 8) | ((data[2] & 0xFF) << 16);
        this.setPacketSequenceNumber(data[3]);
    }
477482
@Override
  public void readHeader(byte[] data) {
    if(ByteArrayUtil.readInt(data, 0) != FILE_VERSION) {
      throw new RuntimeException("PersistentPageFile version does not match!");
    }

    this.pageSize = ByteArrayUtil.readInt(data, 4);
  }
715925
public static long readInt(byte[] data, int start) {
		long ret = (((long) (data[start] & 0xFF) << 24) & 0xFFFFFFFFL)
				| ((data[start + 1] & 0xFF) << 16)
				| ((data[start + 2] & 0xFF) << 8)
				| ((data[start + 3] & 0xFF) << 0);

		return ret;
	}
129143
protected void setGroupContainerData(Map<String, CmsContainerElementData> elementsData) {

        m_elementData = elementsData.get(getGroupContainerWidget().getId());
        if (m_elementData != null) {
            setSaveEnabled(true, null);
            m_groupContainerBean = new CmsGroupContainer();
            m_groupContainerBean.setClientId(m_elementData.getClientId());
            m_groupContainerBean.setResourceType(getGroupContainerWidget().getNewType());
            m_groupContainerBean.setNew(getGroupContainerWidget().isNew());
            m_groupContainerBean.setSitePath(m_elementData.getSitePath());
            if (m_elementData.getTypes().isEmpty()) {
                Set<String> types = new HashSet<String>();
                types.add(((CmsContainerPageContainer)getGroupContainerWidget().getParentTarget()).getContainerType());
                m_elementData.setTypes(types);
                m_groupContainerBean.setTypes(types);
            } else {
                m_groupContainerBean.setTypes(m_elementData.getTypes());
            }
            m_inputDescription.setFormValueAsString(m_elementData.getDescription());
            m_inputTitle.setFormValueAsString(m_elementData.getTitle());
            m_groupContainerBean.setTitle(m_elementData.getTitle());
            m_groupContainerBean.setDescription(m_elementData.getDescription());
        } else {
            CmsDebugLog.getInstance().printLine("Loading groupcontainer error.");
        }
    }
905034
public void fromBytes(byte[] data) {
        int index = 0;
        // 1. read field count
        fieldCount = data[index];
        index++;
        // 2. read warning count
        this.warningCount = ByteHelper.readUnsignedShortLittleEndian(data, index);
        index += 2;
        // 3. read status flag
        this.statusFlag = ByteHelper.readUnsignedShortLittleEndian(data, index);
        // end read
    }
1124784
public static long parseBE4BytesAsUnsigned(byte[] data, int offset)
    {
        long value = ((long)(data[offset + 0] & 0xFF) << 24)
                   | ((long)(data[offset + 1] & 0xFF) << 16)
                   | ((long)(data[offset + 2] & 0xFF) <<  8)
                   | ((long)(data[offset + 3] & 0xFF) <<  0);

        return value;
    }