INNER CODE UNIT · Java

isArray

michel-kraemer/bson4jackson · src/main/java/de/undercouch/bson4jackson/BsonGenerator.java:221

    protected boolean isArray() {
        return _currentDocument != null && _currentDocument.currentArrayPos >= 0;
    }

    /**
     * Retrieves and then increases the current position in the array
     * currently being generated
     * @return the position (before it has been increased) or -1 if
     * the current document is not an array
     */
    protected int getAndIncCurrentArrayPos() {
        if (_currentDocument == null) {
            return -1;
        }
        int r = _currentDocument.currentArrayPos;
        ++_currentDocument.currentArrayPos;
        return r;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…