Decodes a Float object from exactly 4 bytes.

@param src source of encoded bytes
@param srcOffset offset into source array
@return Float object or null
760461
public static Float decodeFloatObj(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        int bits = decodeFloatBits(src, srcOffset);
        bits ^= (bits < 0) ? 0x80000000 : 0xffffffff;
        return bits == 0x7fffffff ? null : Float.intBitsToFloat(bits);
    }
1242618
public static ByteBuf copyFloat(float value) {
        ByteBuf buf = buffer(4);
        buf.writeFloat(value);
        return buf;
    }
291148
public static Float parseFloat(final String str) {
        if (null != str) {
            try {
                return new Float(Float.parseFloat(str.trim()));
            } catch (final Exception e) {
                // :IGNORE:
            }
        }
        return null;
    }
41654
public static Byte decodeByteObjDesc(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            int b = src[srcOffset];
            if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
                return null;
            }
            return decodeByteDesc(src, srcOffset + 1);
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
816479
public static byte[] decompressSafe(final byte[] src, int maxDecompressedSize) {
        if (src == null) {
            throw new IllegalArgumentException("src must not be null.");
        }

        if (maxDecompressedSize <= 0) {
            throw new IllegalArgumentException("maxDecompressedSize must be larger than 0 but " + maxDecompressedSize);
        }

        LZ4SafeDecompressor decompressor = factory.safeDecompressor();

        return decompressor.decompress(src, maxDecompressedSize);
    }
1251760
public final boolean getSet(char src[], int srcStart) {
        // leave most argument checking up to Java exceptions
        array=null;
        arrayOffset=bmpLength=length=0;

        length=src[srcStart++];
        
        if ((length&0x8000) != 0) {
            /* there are supplementary values */
            length&=0x7fff;
            if(src.length<(srcStart+1+length)) {
                length=0;
                throw new IndexOutOfBoundsException();
            }
            bmpLength=src[srcStart++];
        } else {
            /* only BMP values */
            if(src.length<(srcStart+length)) {
                length=0;
                throw new IndexOutOfBoundsException();
            }
            bmpLength=length;
        }
        array = new char[length];
        System.arraycopy(src,srcStart,array,0,length);
        //arrayOffset=srcStart;
        return true;
    }
1010160
public static byte[] decompressFast(byte[] src, int srcOffset, int exactDecompressedSize) {
        if (src == null) {
            throw new IllegalArgumentException("src must not be null.");
        }

        if (srcOffset < 0) {
            throw new IllegalArgumentException("srcOffset must equal to or larger than 0 but " + srcOffset);
        }

        if (exactDecompressedSize < 0) {
            throw new IllegalArgumentException("exactDecompressedSize must equal to or larger than 0 but " + exactDecompressedSize);
        }

        LZ4FastDecompressor decompressor = factory.fastDecompressor();

        return decompressor.decompress(src, srcOffset, exactDecompressedSize);
    }
1027944
public final static void readBytesRef(BytesRef src, BytesRef dst) {
    int length = Bytes.readVInt(src);

    if (length == 0) {
      dst.offset = dst.length = 0;
      return;
    }

    if (dst.bytes.length < length) {
      dst.bytes = new byte[length];
    }

    System.arraycopy(src.bytes, src.offset, dst.bytes, 0, length);

    src.offset += length;
    dst.offset = 0;
    dst.length = length;
  }
1107287
public static int getDecompressedLength(ByteBuffer src, int srcOff) {
    return (src.get(srcOff) & 0xFF) | (src.get(srcOff + 1) & 0xFF) << 8 | (src.get(srcOff + 2) & 0xFF) << 16 | src.get(srcOff + 3) << 24;
  }
206907
public static Character decodeCharacterObjDesc(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            int b = src[srcOffset];
            if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
                return null;
            }
            return decodeCharDesc(src, srcOffset + 1);
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }
1320040
public static int getDecompressedLength(byte[] src, int srcOff) {
    return (src[srcOff] & 0xFF) | (src[srcOff + 1] & 0xFF) << 8 | (src[srcOff + 2] & 0xFF) << 16 | src[srcOff + 3] << 24;
  }
287875
public static float[] decode(final String encodedCoordinate)
  {
    if (encodedCoordinate == null) {
      return null;
    }

    final ImmutableList<String> parts = ImmutableList.copyOf(SPLITTER.split(encodedCoordinate));
    final float[] coordinate = new float[parts.size()];

    for (int i = 0; i < coordinate.length; i++) {
      final Float floatPart = tryParseFloat(parts.get(i));
      if (floatPart == null) {
        return null;
      } else {
        coordinate[i] = floatPart;
      }
    }

    return coordinate;
  }
988683
public static int putBytes(byte[] tgtBytes, int tgtOffset, byte[] srcBytes,
      int srcOffset, int srcLength) {
    System.arraycopy(srcBytes, srcOffset, tgtBytes, tgtOffset, srcLength);
    return tgtOffset + srcLength;
  }
76935
public void write(final byte[] srcBytes, final int srcOffset, final int length)
    {
        buffer.putBytes(offset + position, srcBytes, srcOffset, length);
        position += length;
    }
1197689
public function copyFrom(SplFixedArray $src, int $length = null, int $offset = null, int $srcOffset = null):ByteArray{
		$length    = $length ?? $src->count();
		$offset    = $offset ?? $length;
		$srcOffset = $srcOffset ?? 0;

		$diff = $offset + $length;

		if($diff > $this->count()){
			$this->setSize($diff);
		}

		for($i = 0; $i < $length; $i++){
			$this[$i + $offset] = $src[$i + $srcOffset];
		}

		return $this;
	}
1007039
@Override
	public float readFloat() throws IOException{
		readTally+=4;
		if(order==ByteOrder.BIG_ENDIAN)
			{return in.readFloat();}
		else{
			in.read(w4);
			return ByteBuffer.wrap(w4).order(ByteOrder.LITTLE_ENDIAN).asFloatBuffer().get();
			}
		}
1303918
public static Long decodeLongObjDesc(byte[] src, int srcOffset)
        throws CorruptEncodingException
    {
        try {
            int b = src[srcOffset];
            if (b == NULL_BYTE_HIGH || b == NULL_BYTE_LOW) {
                return null;
            }
            return decodeLongDesc(src, srcOffset + 1);
        } catch (IndexOutOfBoundsException e) {
            throw new CorruptEncodingException(null, e);
        }
    }