ReadInt64() public method

public ReadInt64 ( ) : long
return long
Exemplo n.º 1
0
 internal override bool ReadTag(NbtBinaryReader readStream)
 {
     if (readStream.Selector != null && !readStream.Selector(this)) {
         readStream.ReadInt64();
         return false;
     }
     Value = readStream.ReadInt64();
     return true;
 }
Exemplo n.º 2
0
 internal override bool ReadTag(NbtBinaryReader readStream)
 {
     if (readStream.Selector != null && !readStream.Selector(this))
     {
         readStream.ReadInt64();
         return(false);
     }
     Value = readStream.ReadInt64();
     return(true);
 }
Exemplo n.º 3
0
        void SkipValue()
        {
            if (!atValue)
            {
                throw new NbtFormatException(NoValueToReadError);
            }
            switch (TagType)
            {
            case NbtTagType.Byte:
                reader.ReadByte();
                break;

            case NbtTagType.Short:
                reader.ReadInt16();
                break;

            case NbtTagType.Float:
            case NbtTagType.Int:
                reader.ReadInt32();
                break;

            case NbtTagType.Double:
            case NbtTagType.Long:
                reader.ReadInt64();
                break;

            case NbtTagType.ByteArray:
                reader.Skip(TagLength);
                break;

            case NbtTagType.IntArray:
                reader.Skip(sizeof(int) * TagLength);
                break;

            case NbtTagType.String:
                reader.SkipString();
                break;

            default:
                throw new InvalidOperationException(NonValueTagError);
            }
            atValue    = false;
            valueCache = null;
        }
Exemplo n.º 4
0
        void SkipValue()
        {
            // Make sure to check for "atValue" before calling this method
            switch (TagType)
            {
            case NbtTagType.Byte:
                reader.ReadByte();
                break;

            case NbtTagType.Short:
                reader.ReadInt16();
                break;

            case NbtTagType.Float:
            case NbtTagType.Int:
                reader.ReadInt32();
                break;

            case NbtTagType.Double:
            case NbtTagType.Long:
                reader.ReadInt64();
                break;

            case NbtTagType.ByteArray:
                reader.Skip(TagLength);
                break;

            case NbtTagType.IntArray:
                reader.Skip(sizeof(int) * TagLength);
                break;

            case NbtTagType.String:
                reader.SkipString();
                break;

            default:
                throw new InvalidOperationException(NonValueTagError);
            }
            atValue    = false;
            valueCache = null;
        }
Exemplo n.º 5
0
        internal override bool ReadTag(NbtBinaryReader readStream)
        {
            var length = readStream.ReadInt32();

            if (length < 0)
            {
                throw new NbtFormatException("Negative length given in TAG_Long_Array");
            }

            if (readStream.Selector != null && !readStream.Selector(this))
            {
                readStream.Skip(length * sizeof(long));
                return(false);
            }

            Value = new long[length];
            for (var i = 0; i < length; i++)
            {
                Value[i] = readStream.ReadInt64();
            }
            return(true);
        }
Exemplo n.º 6
0
 internal override void SkipTag(NbtBinaryReader readStream)
 {
     readStream.ReadInt64();
 }
Exemplo n.º 7
0
 internal override void SkipTag(NbtBinaryReader readStream)
 {
     readStream.ReadInt64();
 }
Exemplo n.º 8
0
 internal override void ReadTag(NbtBinaryReader readStream)
 {
     Value = readStream.ReadInt64();
 }