读取表结构

@param {Reader} reader reader对象
@return {Object} 当前对象
171387
function read(reader) {

            var offset = this.offset;

            if (undefined !== offset) {
                reader.seek(offset);
            }

            var me = this;

            this.struct.forEach(function (item) {
                var name = item[0];
                var type = item[1];

                switch (type) {
                    case struct.Int8:
                    case struct.Uint8:
                    case struct.Int16:
                    case struct.Uint16:
                    case struct.Int32:
                    case struct.Uint32:
                        var typeName = struct.names[type];
                        me[name] = reader.read(typeName);
                        break;

                    case struct.Fixed:
                        me[name] = reader.readFixed();
                        break;

                    case struct.LongDateTime:
                        me[name] = reader.readLongDateTime();
                        break;

                    case struct.Bytes:
                        me[name] = reader.readBytes(reader.offset, item[2] || 0);
                        break;

                    case struct.Char:
                        me[name] = reader.readChar();
                        break;

                    case struct.String:
                        me[name] = reader.readString(reader.offset, item[2] || 0);
                        break;

                    default:
                        error.raise(10003, name, type);
                }
            });

            return this.valueOf();
        }
452807
public Reader getReader() {
        // PK33136
        char[] charBuffer = new char[strBuffer.length()] ;
        strBuffer.getChars(0, strBuffer.length(), charBuffer, 0);
        //PK33136
        return (writer == null) ? new CharArrayReader (charBuffer, 0, strBuffer.length()) : null;
    }
370525
function() {
        var token = this.stringToken(this._reader.read(), 0, 0);
        return token.type === Tokens.INVALID ? null : token.value;
    }
533600
public static Parameters parse(Reader reader) throws AponParseException {
        if (reader == null) {
            throw new IllegalArgumentException("reader must not be null");
        }
        AponReader aponReader = new AponReader(reader);
        return aponReader.read();
    }
225648
public static JsonElement parseReader(JsonReader reader)
      throws JsonIOException, JsonSyntaxException {
    boolean lenient = reader.isLenient();
    reader.setLenient(true);
    try {
      return Streams.parse(reader);
    } catch (StackOverflowError e) {
      throw new JsonParseException("Failed parsing JSON source: " + reader + " to Json", e);
    } catch (OutOfMemoryError e) {
      throw new JsonParseException("Failed parsing JSON source: " + reader + " to Json", e);
    } finally {
      reader.setLenient(lenient);
    }
  }
626868
@GwtIncompatible("Reader")
  static CharInput asCharInput(final Reader reader) {
    checkNotNull(reader);
    return new CharInput() {
      @Override
      public int read() throws IOException {
        return reader.read();
      }

      @Override
      public void close() throws IOException {
        reader.close();
      }
    };
  }
332277
public List<Process> read(final Reader reader) throws SAXException,
                                                 IOException {
        this.processes = ((ProcessBuildData) this.parser.read( reader )).getProcesses();
        return this.processes;
    }
884534
public static String getText(Reader reader) throws IOException {
    try {
      StringBuilder source = new StringBuilder();
      BufferedReader buffered = new BufferedReader(reader);
      String line = buffered.readLine();

      while (line != null) {
        source.append(line);
        source.append('\n');
        line = buffered.readLine();
      }

      return source.toString();
    } finally {
      closeQuietly(reader);
    }
  }
252538
public void parseJSON(Reader reader) {
        Listener sajListener = new Listener();
        new JSONAnnie(reader).parse(sajListener);
    }
403244
public static String read(Reader reader, int length) {
        try {
            char[] buffer = new char[length];

            int offset = 0;
            int rest = length;
            int len;
            while ((len = reader.read(buffer, offset, rest)) != -1) {
                rest -= len;
                offset += len;

                if (rest == 0) {
                    break;
                }
            }

            return new String(buffer, 0, length - rest);
        } catch (IOException ex) {
            throw new IllegalStateException("read error", ex);
        }
    }
931367
public final String transform(Reader reader, File inputFile) {
		return transform(reader, inputFile, true);
	}
27490
public <T> T read(final Reader reader, final DataTypeDescriptor<T> descriptor)
			throws Exception {
		if (reader == null) throw new NullPointerException("reader");
		if (descriptor == null) throw new NullPointerException("descriptor");

		JsonParser parser = factory.createParser(reader);
		return read(parser, descriptor);
	}
14078
public static Iterator<String> iterator(Reader self) {
        final BufferedReader bufferedReader;
        if (self instanceof BufferedReader)
            bufferedReader = (BufferedReader) self;
        else
            bufferedReader = new BufferedReader(self);
        return new Iterator<String>() {
            String nextVal /* = null */;
            boolean nextMustRead = true;
            boolean hasNext = true;

            public boolean hasNext() {
                if (nextMustRead && hasNext) {
                    try {
                        nextVal = readNext();
                        nextMustRead = false;
                    } catch (IOException e) {
                        hasNext = false;
                    }
                }
                return hasNext;
            }

            public String next() {
                String retval = null;
                if (nextMustRead) {
                    try {
                        retval = readNext();
                    } catch (IOException e) {
                        hasNext = false;
                    }
                } else
                    retval = nextVal;
                nextMustRead = true;
                return retval;
            }

            private String readNext() throws IOException {
                String nv = bufferedReader.readLine();
                if (nv == null)
                    hasNext = false;
                return nv;
            }

            public void remove() {
                throw new UnsupportedOperationException("Cannot remove() from a Reader Iterator");
            }
        };
    }
1353098
public String[] readTarget(Reader reader) throws IOException {
        Collection<String> targetColl = read(reader).values();
        Set<String> targets = new HashSet<>();
        for (String target : targetColl) {
            targets.add(target);
        }
        return targets.toArray(new String[targets.size()]);
    }
81424
async function read(reader, patcher) {
	let {done, value} = await reader.read();

	if(done || isAttached()) {
		return false;
	}

	//!steal-remove-start
	log.mutations(value);
	//!steal-remove-end

	patcher.patch(value);
	return true;
}
136714
function ( reader, version ) {

			var node = {};

			// The first three data sizes depends on version.
			var endOffset = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();
			var numProperties = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();

			// note: do not remove this even if you get a linter warning as it moves the buffer forward
			var propertyListLen = ( version >= 7500 ) ? reader.getUint64() : reader.getUint32();

			var nameLen = reader.getUint8();
			var name = reader.getString( nameLen );

			// Regards this node as NULL-record if endOffset is zero
			if ( endOffset === 0 ) return null;

			var propertyList = [];

			for ( var i = 0; i < numProperties; i ++ ) {

				propertyList.push( this.parseProperty( reader ) );

			}

			// Regards the first three elements in propertyList as id, attrName, and attrType
			var id = propertyList.length > 0 ? propertyList[ 0 ] : '';
			var attrName = propertyList.length > 1 ? propertyList[ 1 ] : '';
			var attrType = propertyList.length > 2 ? propertyList[ 2 ] : '';

			// check if this node represents just a single property
			// like (name, 0) set or (name2, [0, 1, 2]) set of {name: 0, name2: [0, 1, 2]}
			node.singleProperty = ( numProperties === 1 && reader.getOffset() === endOffset ) ? true : false;

			while ( endOffset > reader.getOffset() ) {

				var subNode = this.parseNode( reader, version );

				if ( subNode !== null ) this.parseSubNode( name, node, subNode );

			}

			node.propertyList = propertyList; // raw property list used by parent

			if ( typeof id === 'number' ) node.id = id;
			if ( attrName !== '' ) node.attrName = attrName;
			if ( attrType !== '' ) node.attrType = attrType;
			if ( name !== '' ) node.name = name;

			return node;

		}
610715
public static boolean hasQObject(final Reader reader) throws IOException {
    final MetaObjectParser parser = new MetaObjectParser();
    parser.parse(reader);
    return parser.hasQObject;

  }