     func writeUTF(var value:String)
     {
         var num = UInt16(count(value.utf8))
-        if endian == Endian.BIG_ENIDAN
+        if endian == Endian.BIG_ENDIAN
         {
             num = num.bigEndian
         }

        range.location = position
        range.length = 8
        
        if endian == Endian.BIG_ENIDAN
        {
            var bytes = ByteArray.dump(value)
            bytes.reverse()
            
            data.replaceBytesInRange(range, withBytes: &bytes)
        }

        return value
    }
    
    //MARK: class tools
    
    class func dump<T>(var target:T)->[UInt8]
    {
