public void skip()

in java/core/src/main/java/org/bondlib/SimpleBinaryReader.java [204:297]


    public void skip(SchemaDef schemaDef, TypeDef type) throws IOException {
        switch (type.id.value) {

            case BondDataType.Values.BT_BOOL:
                this.skipBool();
                break;

            case BondDataType.Values.BT_UINT8:
                this.skipUInt8();
                break;

            case BondDataType.Values.BT_UINT16:
                this.skipUInt16();
                break;

            case BondDataType.Values.BT_UINT32:
                this.skipUInt32();
                break;

            case BondDataType.Values.BT_UINT64:
                this.skipUInt64();
                break;

            case BondDataType.Values.BT_FLOAT:
                this.skipFloat();
                break;

            case BondDataType.Values.BT_DOUBLE:
                this.skipDouble();
                break;

            case BondDataType.Values.BT_STRING:
                this.skipString();
                break;

            case BondDataType.Values.BT_STRUCT:
                if (type.bonded_type) {
                    int count = readLength();
                    skipBytes(count);
                } else {
                    final StructDef structDef = schemaDef.structs.get(type.struct_def);
                    final TypeDef baseDef = structDef.base_def;
                    if (baseDef != null) {
                        skip(schemaDef, baseDef);
                    }
                    for (final org.bondlib.FieldDef field : structDef.fields) {
                        skip(schemaDef, field.type);
                    }
                }
                break;

            case BondDataType.Values.BT_LIST:
            case BondDataType.Values.BT_SET: {
                int numElems = readLength();
                final TypeDef elementTypeDef = type.element;
                for (int i = 0; i < numElems; i++) {
                    skip(schemaDef, elementTypeDef);
                }
                break;
            }
            case BondDataType.Values.BT_MAP: {
                int numElems = readLength();
                final TypeDef keyTypeDef = type.key;
                final TypeDef valueTypeDef = type.element;
                for (int i = 0; i < numElems; i++) {
                    skip(schemaDef, keyTypeDef);
                    skip(schemaDef, valueTypeDef);
                }
                break;
            }
            case BondDataType.Values.BT_INT8:
                this.skipInt8();
                break;

            case BondDataType.Values.BT_INT16:
                this.skipInt16();
                break;

            case BondDataType.Values.BT_INT32:
                this.skipInt32();
                break;

            case BondDataType.Values.BT_INT64:
                this.skipInt64();
                break;

            case BondDataType.Values.BT_WSTRING:
                this.skipWString();
                break;

            default:
                throw new IllegalArgumentException("unknown BondDataType while skipping");
        }
    }