/// <summary> /// Method ReadInt32 /// </summary> /// <returns>An int</returns> public override int ReadInt32() { int x = base.ReadInt32(); int y = EndianSupport.SwitchEndian(x); return(y); }
/// <summary> /// Method Write /// </summary> /// <param name="chars">A char[]</param> /// <param name="index">An int</param> /// <param name="count">An int</param> public override void Write(char[] chars, int index, int count) { char[] t = new char[count]; for (int i = 0; i < count; i++) { t[index + i] = EndianSupport.SwitchEndian(t[index + i]); } base.Write(t); }
/// <summary> /// Method Read /// </summary> /// <returns>An int</returns> /// <param name="buffer">A char[]</param> /// <param name="index">An int</param> /// <param name="count">An int</param> public override int Read(char[] buffer, int index, int count) { int size = base.Read(buffer, index, count); for (int i = 0; i < size; i++) { buffer[index + i] = EndianSupport.SwitchEndian(buffer[index + i]); } return(size); }
/// <summary> /// Method ReadChars /// </summary> /// <returns>A char[]</returns> /// <param name="count">An int</param> public override char[] ReadChars(int count) { char[] rc = base.ReadChars(count); if (rc != null) { for (int i = 0; i < rc.Length; i++) { rc[i] = EndianSupport.SwitchEndian(rc[i]); } } return(rc); }
/// <summary> /// Method ReadInt64 /// </summary> /// <returns>A long</returns> public override long ReadInt64() { return(EndianSupport.SwitchEndian(base.ReadInt64())); }
/// <summary> /// Method ReadInt16 /// </summary> /// <returns>A short</returns> public override short ReadInt16() { return(EndianSupport.SwitchEndian(base.ReadInt16())); }
public override double ReadDouble() { return(EndianSupport.SwitchEndian(base.ReadDouble())); }
public override float ReadSingle() { return(EndianSupport.SwitchEndian(base.ReadSingle())); }
/// <summary> /// Method ReadUInt32 /// </summary> /// <returns>An uint</returns> public override uint ReadUInt32() { return(EndianSupport.SwitchEndian(base.ReadUInt32())); }
/// <summary> /// Method Write /// </summary> /// <param name="value">An uint</param> public override void Write(uint value) { base.Write(EndianSupport.SwitchEndian(value)); }
/// <summary> /// Method Write /// </summary> /// <param name="value">An int</param> public override void Write(int value) { int x = EndianSupport.SwitchEndian(value); base.Write(x); }