/// <summary>Writes a Little-endian int.</summary> /// <remarks>Writes a Little-endian int.</remarks> /// <param name="out">the data output to write to.</param> /// <param name="v">value to write.</param> /// <exception>IOException</exception> /// <exception cref="System.IO.IOException"></exception> public static void writeInt(java.io.DataOutput @out, int v) { if (System.BitConverter.IsLittleEndian) { @out.writeInt(v); } else { @out.writeByte(unchecked((int)(0xff)) & v); @out.writeByte(unchecked((int)(0xff)) & ((v) >> (8 & 0x1f))); @out.writeByte(unchecked((int)(0xff)) & ((v) >> (16 & 0x1f))); @out.writeByte(unchecked((int)(0xff)) & ((v) >> (24 & 0x1f))); } }
/// <summary>Writes the state of this object to the stream passed.</summary> /// <remarks>Writes the state of this object to the stream passed.</remarks> /// <param name="out">the stream to write the state to.</param> /// <exception cref="System.IO.IOException">if the stream throws it during the write. /// </exception> /// <serialData> /// /// <code>int</code> /// - the length of this object. /// <code>char[]</code> /// - the /// buffer from this object, which may be larger than the length /// field. /// </serialData> private void writeObject(java.io.ObjectOutputStream @out) { @out.defaultWriteObject(); @out.writeInt(Length); @out.writeObject(getValue()); }
private void writeObject(java.io.ObjectOutputStream oos) { if (m_modelData != null) { oos.writeInt(3); oos.writeInt(m_modelData.Length); oos.write(m_modelData, 0, m_modelData.Length); oos.writeBoolean(m_mustValue.HasValue); oos.writeInt(m_mustValue.HasValue ? m_mustValue.Value : 0); oos.writeDouble(m_delta.Value); } }