This method retrieves a byte array containing the data at the
given offset in the block. If no data is found at the given offset
this method returns null.

@param offset offset of required data
@return byte array containing required data
960946
public byte[] getByteArray(Integer offset)
   {
      byte[] result = null;

      if (offset != null)
      {
         result = m_map.get(offset);
      }

      return (result);
   }
1208175
public void readBytes (byte[] bytes, int offset, int count) throws KryoException {
		if (bytes == null) throw new IllegalArgumentException("bytes cannot be null.");
		int copyCount = Math.min(limit - position, count);
		while (true) {
			System.arraycopy(buffer, position, bytes, offset, copyCount);
			position += copyCount;
			count -= copyCount;
			if (count == 0) break;
			offset += copyCount;
			copyCount = Math.min(count, capacity);
			require(copyCount);
		}
	}
45666
private byte[] getDiskBytes(long offset)
      throws IOException {
    mappedFile.seek(dataOffset + offset);

    //Get size of data
    int size = LongPacker.unpackInt(mappedFile);

    //Create output bytes
    byte[] res = new byte[size];

    //Read data
    if (mappedFile.read(res) == -1) {
      throw new EOFException();
    }

    return res;
  }
105034
public static int parseBE4BytesAsInt(byte[] data, int offset)
    {
        int value = ((data[offset + 0] & 0xFF) << 24)
                  | ((data[offset + 1] & 0xFF) << 16)
                  | ((data[offset + 2] & 0xFF) <<  8)
                  | ((data[offset + 3] & 0xFF));

        return value;
    }
657694
public static String data(byte[] data, int offset, int length) {
        try {
            return stream(new ByteArrayInputStream(data, offset, length), length);
        } catch (IOException e) {
            throw new AssertionError(e);
        }
    }
464534
public static DataChecksum newDataChecksum( byte bytes[], int offset ) {
    if ( offset < 0 || bytes.length < offset + HEADER_LEN ) {
      return null;
    }
    
    // like readInt():
    int bytesPerChecksum = getIntFromBytes(bytes, offset + 1);
    return newDataChecksum( bytes[offset], bytesPerChecksum );
  }
194320
public static byte[] readBytes(ByteBuffer buffer, int offset, int size) {
        final byte[] dest = new byte[size];
        buffer.get(dest, offset, size);
        return dest;
    }
673436
public int getBytes(byte[] buf, int offset, int length)
    {
        if (length>unconsumedData())
            length=unconsumedData();
        System.arraycopy(_buf,_pos,buf,offset,length);
        _pos+=length;
        return length;
    }
272601
public static int byteArrayToInt(byte[] b, int offset) {
        int value = 0;
        for (int i = 0; i < 4; i++) {
            int shift = (4 - 1 - i) * 8;
            value += (b[i + offset] & 0x000000FF) << shift;
}
        return value;
    }
508863
public static int bytesToInt(byte[] bytes, int offset) {
        // 
        int result = 0x00000000;

        int length;
        if (bytes.length - offset < 4) // maximum byte size for int data type
                                        // is 4
            length = bytes.length - offset;
        else
            length = 4;

        int end = offset + length;
        for (int i = 0; i < length; i++) {
            result |= (bytes[end - i - 1] & 0xff) << (8 * i); // TODO uudashr: CHECK FOR IMPROVEMENT
        }
        return result;
    }
204979
public int toByteArray(byte[] target, int targetOffset) throws IOException {
        long length = length();
        if ((long)targetOffset + length > Integer.MAX_VALUE) {
            throw new IOException("Unable to write - too big data");
        }
        if (target.length < targetOffset + length) {
            throw new IOException("Insufficient target byte array size");
        }

        if (length < 0) {
            length = 0;
            int curOffset = targetOffset;
            InputStream in = asStream();
            try {
                int readbyte;
                while ((readbyte = in.read()) != EOF) {
                    target[curOffset] = (byte) readbyte;
                    curOffset++;
                    length++;
                }
            } finally {
                in.close();
            }
        }
        else
        {
            System.arraycopy(asByteArray(false), 0, target, targetOffset, (int)length);
        }
        return (int)length;
    }
23913
public static final long getLong(byte[] data, int offset)
   {
      long result = 0;
      int i = offset;
      for (int shiftBy = 0; shiftBy < 64; shiftBy += 8)
      {
         result |= ((long) (data[i] & 0xff)) << shiftBy;
         ++i;
      }
      return result;
   }
479524
public byte[] getData(byte[] dst, int offset)
	{
		final int end = Math.min(data.length, dst.length - offset);
		for (int i = 0; i < end; ++i)
			dst[offset + i] = (byte) data[i];
		return dst;
	}

	/* (non-Javadoc)
	 * @see tuwien.auto.calimero.dptxlator.DPTXlator#getSubTypes()
	 */
	public final Map getSubTypes()
	{
		return types;
	}

	/**
	 * @return the subtypes of the 8 Bit unsigned translator type
	 * @see DPTXlator#getSubTypesStatic()
	 */
	protected static Map getSubTypesStatic()
	{
		return types;
	}

	/**
	 * Sets a new subtype to use for translating items.
	 * <p>
	 * The translator is reset into default state, all currently contained items are
	 * removed (default value is set).
	 * 
	 * @param dptID new subtype ID to set
	 * @throws KNXFormatException on wrong formatted or not expected (available)
	 *         <code>dptID</code>
	 */
	private void setSubType(String dptID) throws KNXFormatException
	{
		setTypeID(types, dptID);
		data = new short[1];
	}

	private short fromDPT(short data)
	{
		short value = data;
		if (dpt.equals(DPT_SCALING))
			value = (short) Math.round(data * 100.0f / 255);
		else if (dpt.equals(DPT_ANGLE))
			value = (short) Math.round(data * 360.0f / 255);
		return value;
	}

	private String makeString(int index)
	{
		return appendUnit(Short.toString(fromDPT(data[index])));
	}

	protected void toDPT(String value, short[] dst, int index) throws KNXFormatException
	{
		try {
			dst[index] = toDPT(Short.decode(removeUnit(value)).shortValue());
		}
		catch (final NumberFormatException e) {
			throw logThrow(LogLevel.WARN, "wrong value format " + value, null, value);
		}
	}

	private short toDPT(int value) throws KNXFormatException
	{
		int convert = value;
		if (dpt.equals(DPT_SCALING))
			convert = Math.round(value * 255.0f / 100);
		else if (dpt.equals(DPT_ANGLE))
			convert = Math.round(value * 255.0f / 360);
		if (convert < 0 || convert > 255)
			throw logThrow(LogLevel.WARN, "translation error for " + value,
				"input value out of range [" + dpt.getLowerValue() + ".."
					+ dpt.getUpperValue() + "]", Integer.toString(value));
		return (short) convert;
	}
}
1105661
@Override
    public byte[] getBytes(K key) {
        if(key == null) {
            return null;
        }
        
        return _store.get(_keySerializer.serialize(key));
    }
331648
public function offsetGet ($offset) {
        return isset($this->data[$offset]) ? $this->data[$offset] : NULL;
    }
800478
public byte byteAt(int i) {

    if (i < 0) {
      throw new IndexOutOfBoundsException("i < 0, " + i);
    }

    if (i >= length) {
      throw new IndexOutOfBoundsException("i >= length, " + i + " >= " + length);
    }

    return data[offset + i];
  }
414654
@Override
    public V get(ByteBuffer b, int offset, int len) {
        int t = 0;
        for (int i = 0; i < len; i++) {
            byte c = b.get(offset + i);
            int index = __lookup[c & 0x7f];
            if (index >= 0) {
                int idx = t * ROW_SIZE + index;
                t = _rowIndex[idx];
                if (t == 0)
                    return null;
            } else {
                char[] big = _bigIndex == null ? null : _bigIndex[t];
                if (big == null)
                    return null;
                t = big[c];
                if (t == 0)
                    return null;
            }
        }
        return (V) _value[t];
    }