h2/src/main/org/h2/mvstore/Chunk.java
/**
     * Read the header from the byte buffer.
     *
     * @param buff the source buffer
     * @param start the start of the chunk in the file
     * @return the chunk
     */
Read the header from the byte buffer.
@param buff the source buffer
@param start the start of the chunk in the file
@return the chunk
Read the header from the byte buffer . @param buff the source buffer @param start the start of the chunk in the file @return the chunk
static Chunk fromHeader(ByteBuffer buff, long start) {
        if (buff.get() != 'c') {
            throw DataUtils.newIllegalStateException(
                    DataUtils.ERROR_FILE_CORRUPT,
                    "File corrupt reading chunk at position {0}", start);
        }
        int length = buff.getInt();
        int chunkId = buff.getInt();
        int pageCount = buff.getInt();
        long metaRootPos = buff.getLong();
        long maxLength = buff.getLong();
        long maxLengthLive = buff.getLong();
        Chunk c = new Chunk(chunkId);
        c.length = length;
        c.pageCount = pageCount;
        c.pageCountLive = pageCount;
        c.start = start;
        c.metaRootPos = metaRootPos;
        c.maxLength = maxLength;
        c.maxLengthLive = maxLengthLive;
        return c;
    }
static Chunk fromHeader ( ByteBuffer buff , long start ) { if ( buff . get ( ) != 'c' ) { throw DataUtils . newIllegalStateException ( DataUtils . ERROR_FILE_CORRUPT , "File corrupt reading chunk at position {0}" , start ) ; } int length = buff . getInt ( ) ; int chunkId = buff . getInt ( ) ; int pageCount = buff . getInt ( ) ; long metaRootPos = buff . getLong ( ) ; long maxLength = buff . getLong ( ) ; long maxLengthLive = buff . getLong ( ) ; Chunk c = new Chunk ( chunkId ) ; c . length = length ; c . pageCount = pageCount ; c . pageCountLive = pageCount ; c . start = start ; c . metaRootPos = metaRootPos ; c . maxLength = maxLength ; c . maxLengthLive = maxLengthLive ; return c ; }
Read the header from the byte buffer.
Read the header from the byte buffer .