com.webpieces.http2parser.impl.ParserResultImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http2-parser Show documentation
Show all versions of http2-parser Show documentation
A re-usable asynchronous http2 parser
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