Search in sources :

Example 16 with DataFrame

use of com.webpieces.http2parser.api.dto.DataFrame in project webpieces by deanhiller.

the class ChunkedStream method writeDataOut.

private void writeDataOut() {
    byte[] data = str.toByteArray();
    str = new ByteArrayOutputStream();
    DataWrapper body = wrapperFactory.wrapByteArray(data);
    log.info("caching " + type + " data=" + body.getReadableSize());
    DataFrame frame = new DataFrame();
    frame.setEndOfStream(false);
    frame.setData(body);
    cache.add(frame);
}
Also used : DataWrapper(org.webpieces.data.api.DataWrapper) ByteArrayOutputStream(java.io.ByteArrayOutputStream) DataFrame(com.webpieces.http2parser.api.dto.DataFrame)

Aggregations

DataFrame (com.webpieces.http2parser.api.dto.DataFrame)16 DataWrapper (org.webpieces.data.api.DataWrapper)11 Http2Request (com.webpieces.hpack.api.dto.Http2Request)7 GoAwayFrame (com.webpieces.http2parser.api.dto.GoAwayFrame)6 Test (org.junit.Test)6 StreamWriter (com.webpieces.http2engine.api.StreamWriter)4 MockResponseListener (org.webpieces.http2client.mock.MockResponseListener)4 ConnectionClosedException (com.webpieces.http2engine.api.ConnectionClosedException)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 MockStreamWriter (org.webpieces.http2client.mock.MockStreamWriter)3 Http2Push (com.webpieces.hpack.api.dto.Http2Push)2 IOException (java.io.IOException)2 OutputStream (java.io.OutputStream)2 CompletableFuture (java.util.concurrent.CompletableFuture)2 ResponseStream (org.webpieces.frontend2.api.ResponseStream)2 Http2Response (com.webpieces.hpack.api.dto.Http2Response)1 Http2Trailers (com.webpieces.hpack.api.dto.Http2Trailers)1 StreamHandle (com.webpieces.http2engine.api.StreamHandle)1 Http2ClientEngine (com.webpieces.http2engine.api.client.Http2ClientEngine)1 Http2ClientEngineFactory (com.webpieces.http2engine.api.client.Http2ClientEngineFactory)1