Write a float to the byte array at the given offset.

@param array Array to write to
@param offset Offset to write to
@param v data
@return number of bytes written
551334
public static int writeFloat(byte[] array, int offset, float v) {
    return writeInt(array, offset, Float.floatToIntBits(v));
  }
1083934
public static final void writeLong(long value, byte[] array, int offset)
    {
        if (array.length < offset + 8)
        {
            throw new IllegalArgumentException("no room in array");
        }
        array[offset] = (byte) (value >> 56);
        array[offset + 1] = (byte) ((value >> 48) & 0xff);
        array[offset + 2] = (byte) ((value >> 40) & 0xff);
        array[offset + 3] = (byte) ((value >> 32) & 0xff);
        array[offset + 4] = (byte) ((value >> 24) & 0xff);
        array[offset + 5] = (byte) ((value >> 16) & 0xff);
        array[offset + 6] = (byte) ((value >> 8) & 0xff);
        array[offset + 7] = (byte) (value & 0xff);
    }
1057972
public static int readInt(byte[] array, int offset) {
    // First make integers to resolve signed vs. unsigned issues.
    int b0 = array[offset + 0] & 0xFF;
    int b1 = array[offset + 1] & 0xFF;
    int b2 = array[offset + 2] & 0xFF;
    int b3 = array[offset + 3] & 0xFF;
    return ((b0 << 24) + (b1 << 16) + (b2 << 8) + (b3 << 0));
  }
372739
public void writeByteCurrentPosition(byte v) throws IOException {
    int index = (int)(position - bufferOffset);
    if (index < maxBufferSize) {
      buffer[index] = v;
      isByte[index] = true;
      if (index + 1 > currentBufferSize) currentBufferSize = index + 1;
      if (index + 1 >= maxBufferSize) {
        writeBuffer();
        newBuffer(position + 1);
      }
    } else {
      aFile.write(v);
    }
    position++;
  }
1182655
public static final void writeUTF(DataOutput out,
                                      char[] chars, int offset, int length)
        throws IOException
    {
        for (int i=0; i<length; i++) {
            int c = chars[i + offset];
            if ((c >= 0x0001) && (c <= 0x007F)) {
                out.writeByte(c);
            }
            else if (c > 0x07FF) {
                out.writeByte(0xe0 | ((c >> 12) & 0x0f));
                out.writeByte(0x80 | ((c >> 6) & 0x3f));
                out.writeByte(0x80 | (c & 0x3f));
            }
            else {
                out.writeByte(0xc0 | ((c >> 6) & 0x1f));
                out.writeByte(0x80 | (c & 0x3f));
            }
        }
    }
747606
public static final void writeInt(int value, byte[] array, int offset)
    {
        if (array.length < offset + 4)
        {
            throw new IllegalArgumentException("no room in array");
        }
        array[offset] = (byte) (value >> 24);
        array[offset + 1] = (byte) ((value >> 16) & 0xff);
        array[offset + 2] = (byte) ((value >> 8) & 0xff);
        array[offset + 3] = (byte) (value & 0xff);
    }
739997
public void write(byte[] bytes, int offset, int len)
    {
        if (bytes == null)
        {
            return;
        }
        if ((offset < 0) || (offset > bytes.length) || (len < 0) || ((offset + len) - bytes.length > 0))
        {
            throw new IndexOutOfBoundsException("offset=" + offset + ", len=" + len + ", bytes.length=" + bytes.length);
        }
        ensureCapacity(size + len);
        System.arraycopy(bytes, offset, buffer, size, len);
        size += len;
    }
808870
public static final short readShort(byte[] array, int offset)
    {
        if (array.length < offset + 2)
        {
            throw new IllegalArgumentException("no room in array");
        }
        return 
                (short) (((array[offset]<<8) & 0xff00) +
                (array[offset + 1] & 0xff ));
    }
374717
public static int writeInt(byte[] array, int offset, int v) {
    array[offset + 0] = (byte) (v >>> 24);
    array[offset + 1] = (byte) (v >>> 16);
    array[offset + 2] = (byte) (v >>> 8);
    array[offset + 3] = (byte) (v >>> 0);
    return SIZE_INT;
  }
501747
@Override
	public void writeBytes(byte[] value, int offset, int length) throws JMSException
    {
        byte[] reducedValue = new byte[length];
        System.arraycopy(value, offset, reducedValue, 0, length);
        write(reducedValue);
    }
977705
public void toBytes(byte[] b, int offset) {
    ByteConverter.float8(b, offset, x);
    ByteConverter.float8(b, offset + 8, y);
  }
666228
@Override
  public void write(byte []buffer, int offset, int length)
  {
    if (isClosed() || isHead()) {
      return;
    }

    int byteLength = _offset;
    
    while (true) {
      int sublen = Math.min(length, SIZE - byteLength);

      System.arraycopy(buffer, offset, _buffer, byteLength, sublen);
      offset += sublen;
      length -= sublen;
      byteLength += sublen;
      
      if (length <= 0) {
        break;
      }
      
      _offset = byteLength;
      flushByteBuffer();
      byteLength = _offset;
    }

    _offset = byteLength;
  }
753247
@Override
	public void writeInt(int v) throws IOException {
		outputStream.write(0xFF & v);
		outputStream.write(0xFF & (v >> 8));
		outputStream.write(0xFF & (v >> 16));
		outputStream.write(0xFF & (v >> 24));
		bytesWritten += 4;
	}
707654
public static int readUnsignedShort(byte[] array, int offset) {
    // First make integers to resolve signed vs. unsigned issues.
    int b0 = array[offset + 0] & 0xFF;
    int b1 = array[offset + 1] & 0xFF;
    return ((b0 << 8) + (b1 << 0));
  }
1102696
@Override
  public void writeInt(int v) throws IOException {
    work[0] = (byte) (0xffL & v);
    work[1] = (byte) (0xffL & (v >> 8));
    work[2] = (byte) (0xffL & (v >> 16));
    work[3] = (byte) (0xffL & (v >> 24));
    write(work, 0, 8);
  }
706695
public void writeBytes(byte[] data, int offset, int length) throws IOException
    {
        prepareValue();
        updateLength(length);
        buffer.writeBytes(data, offset, length);
        finishValue();
    }
1048710
public void write(int v) throws IOException {
	byte b[] = new byte[1];
	b[0] = (byte) v;
	pos += blob.write(b, 0, pos, 1);
    }