Example #1
0
        /// <summary>
        /// Create a writer constructor, to write to little endian file
        /// </summary>
        /// <param name="path">The path to the file, to read</param>
        /// <param name="boBO">The order of the bytes, to read</param>
        //  L192 create constructor to pass in the path, and the byteorder to write to the littleendian
        public Writer(string path, byteorder boBO)
        {
            bw = new BinaryWriter(File.OpenWrite(path));

            // L192 leave default order as littleendian
            Byteorder = boBO;
        }
Example #2
0
        /// <summary>
        /// Create a reader, to read a file
        /// </summary>
        /// <param name="path">The path to the file, to read</param>
        /// <param name="boBO">The order of the bytes, to read</param>
        // L187 constructor to pass tru our Byteorder along with path
        public Reader(string path, byteorder boBO)
        {
            // L187 set binary reader to the path of the file to be opened and read
            br = new BinaryReader(File.OpenRead(path));

            // L187 set are Byteorder to passed in byteorder
            this.Byteorder = boBO;
        }
Example #3
0
 /// <summary>
 /// User chooses the byteorder, BigEndian or LittleEndian
 /// </summary>
 /// <param name="bo"></param>
 // L189 chang byte order from big to little endian or visa versa, L195 moved here from reader class
 public void changeByteOrder(byteorder bo)
 {
     // L189 in this class not the BaseIO class
     this.Byteorder = bo;
 }