SkipString() 공개 메소드

public SkipString ( ) : void
리턴 void
예제 #1
0
 internal override bool ReadTag(NbtBinaryReader readStream)
 {
     if (readStream.Selector != null && !readStream.Selector(this))
     {
         readStream.SkipString();
         return(false);
     }
     Value = readStream.ReadString();
     return(true);
 }
예제 #2
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.LongArray:
                reader.Skip(sizeof(long) * TagLength);
                break;

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

            default:
                throw new InvalidOperationException(NonValueTagError);
            }
            atValue    = false;
            valueCache = null;
        }
예제 #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;
        }
예제 #4
0
 internal override void SkipTag(NbtBinaryReader readStream)
 {
     readStream.SkipString();
 }
예제 #5
0
파일: NbtList.cs 프로젝트: wledfor2/fNbt
        internal override void SkipTag(NbtBinaryReader readStream)
        {
            // read list type, and make sure it's defined
            ListType = readStream.ReadTagType();

            int length = readStream.ReadInt32();

            if (length < 0)
            {
                throw new NbtFormatException("Negative list size given.");
            }

            switch (ListType)
            {
            case NbtTagType.Byte:
                readStream.Skip(length);
                break;

            case NbtTagType.Short:
                readStream.Skip(length * sizeof(short));
                break;

            case NbtTagType.Int:
                readStream.Skip(length * sizeof(int));
                break;

            case NbtTagType.Long:
                readStream.Skip(length * sizeof(long));
                break;

            case NbtTagType.Float:
                readStream.Skip(length * sizeof(float));
                break;

            case NbtTagType.Double:
                readStream.Skip(length * sizeof(double));
                break;

            default:
                for (int i = 0; i < length; i++)
                {
                    switch (listType)
                    {
                    case NbtTagType.ByteArray:
                        new NbtByteArray().SkipTag(readStream);
                        break;

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

                    case NbtTagType.List:
                        new NbtList().SkipTag(readStream);
                        break;

                    case NbtTagType.Compound:
                        new NbtCompound().SkipTag(readStream);
                        break;

                    case NbtTagType.IntArray:
                        new NbtIntArray().SkipTag(readStream);
                        break;
                    }
                }
                break;
            }
        }
예제 #6
0
        internal override void SkipTag(NbtBinaryReader readStream)
        {
            while (true)
            {
                NbtTagType nextTag = readStream.ReadTagType();
                NbtTag     newTag;
                switch (nextTag)
                {
                case NbtTagType.End:
                    return;

                case NbtTagType.Byte:
                    newTag = new NbtByte();
                    break;

                case NbtTagType.Short:
                    newTag = new NbtShort();
                    break;

                case NbtTagType.Int:
                    newTag = new NbtInt();
                    break;

                case NbtTagType.Long:
                    newTag = new NbtLong();
                    break;

                case NbtTagType.Float:
                    newTag = new NbtFloat();
                    break;

                case NbtTagType.Double:
                    newTag = new NbtDouble();
                    break;

                case NbtTagType.ByteArray:
                    newTag = new NbtByteArray();
                    break;

                case NbtTagType.String:
                    newTag = new NbtString();
                    break;

                case NbtTagType.List:
                    newTag = new NbtList();
                    break;

                case NbtTagType.Compound:
                    newTag = new NbtCompound();
                    break;

                case NbtTagType.IntArray:
                    newTag = new NbtIntArray();
                    break;

                case NbtTagType.LongArray:
                    newTag = new NbtLongArray();
                    break;

                default:
                    throw new NbtFormatException("Unsupported tag type found in NBT_Compound: " + nextTag);
                }
                readStream.SkipString();
                newTag.SkipTag(readStream);
            }
        }
예제 #7
0
파일: NbtString.cs 프로젝트: LiveMC/SharpMC
 internal override bool ReadTag( NbtBinaryReader readStream )
 {
     if( readStream.Selector != null && !readStream.Selector( this ) ) {
         readStream.SkipString();
         return false;
     }
     Value = readStream.ReadString();
     return true;
 }
예제 #8
0
파일: NbtString.cs 프로젝트: LiveMC/SharpMC
 internal override void SkipTag( NbtBinaryReader readStream )
 {
     readStream.SkipString();
 }