/// <summary>Writes a Little-endian short.</summary> /// <remarks>Writes a Little-endian short.</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 writeShort(java.io.DataOutput @out, short v) { if (System.BitConverter.IsLittleEndian) { @out.writeShort(v); } else { @out.writeByte((unchecked((int)(0xff)) & v)); @out.writeByte((unchecked((int)(0xff)) & ((v) >> (8 & 0x1f)))); } }