     
     func writeUInt32(var value:UInt32)
     {
-        if endian == Endian.BIG_ENIDAN
+        if endian == Endian.BIG_ENDIAN
         {
             value = value.bigEndian
         }

        position = 0
    }
    
    //MARK: subscript
    subscript(index:Int)->UInt8
    {

        var value:Int16 = 0
        data.getBytes(&value, range: range)
        position += range.length
        return endian == Endian.BIG_ENDIAN ? value.bigEndian : value
    }
    
    func readInt32()->Int32
