All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.webpieces.http2parser.impl.ParserResultImpl Maven / Gradle / Ivy

There is a newer version: 2.1.1
Show newest version
package com.webpieces.http2parser.impl;

import java.util.List;

import org.webpieces.data.api.DataWrapper;

import com.webpieces.http2parser.api.ParserResult;
import com.webpieces.http2parser.api.dto.Http2Frame;

public class ParserResultImpl implements ParserResult {
    final private List frames;
    final private DataWrapper leftOverData;

    public ParserResultImpl(List frames, DataWrapper leftOverData) {
        this.frames = frames;
        this.leftOverData = leftOverData;
    }

    @Override
    public List getParsedFrames() {
        return frames;
    }

    @Override
    public DataWrapper getMoreData() {
        return leftOverData;
    }

    @Override
    public boolean hasMoreData() {
        return leftOverData.getReadableSize() > 0;
    }

    @Override
    public boolean hasParsedFrames() {
        return frames.size() > 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy