APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.net.http.qpack.writers

public Class HeaderFrameWriter

extends Object
Class Inheritance
Imports
jdk.internal.net.http.qpack.QPACK, .TableEntry, java.nio.ByteBuffer, java.util.concurrent.atomic.AtomicLong

Field Summary

Modifier and TypeField and Description
private boolean
private static final AtomicLong
private final FieldLineIndexedWriter
private final FieldLineLiteralsWriter
private final FieldLineIndexedNameWriter
private final QPACK.Logger
private BinaryRepresentationWriter

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
private void
public void
configure(TableEntry e, boolean sensitive, long base)

public boolean

Returns:

true if the current header has been fully encoded, false otherwise
write
(ByteBuffer
the buffer to encode the header into, may be empty
headerFrame
)

Writes the set up header into the given buffer.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

encodingback to summary
private boolean encoding
HEADER_FRAME_WRITER_IDSback to summary
private static final AtomicLong HEADER_FRAME_WRITER_IDS
indexedWriterback to summary
private final FieldLineIndexedWriter indexedWriter
literalWithLiteralNameWriterback to summary
private final FieldLineLiteralsWriter literalWithLiteralNameWriter
literalWithNameReferenceWriterback to summary
private final FieldLineIndexedNameWriter literalWithNameReferenceWriter
loggerback to summary
private final QPACK.Logger logger
writerback to summary
private BinaryRepresentationWriter writer

Constructor Detail

HeaderFrameWriterback to summary
public HeaderFrameWriter()
HeaderFrameWriterback to summary
public HeaderFrameWriter(QPACK.Logger parentLogger)

Method Detail

checkIfEncodingInProgressback to summary
private void checkIfEncodingInProgress()
configureback to summary
public void configure(TableEntry e, boolean sensitive, long base)
writeback to summary
public boolean write(ByteBuffer headerFrame)

Writes the set up header into the given buffer.

The method writes as much as possible of the header's binary representation into the given buffer, starting at the buffer's position, and increments its position to reflect the bytes written. The buffer's mark and limit will not be modified.

Once the method has returned true, the configured header is deemed encoded. A new header may be set up.

Parameters
headerFrame:ByteBuffer

the buffer to encode the header into, may be empty

Returns:boolean

true if the current header has been fully encoded, false otherwise

Exceptions
NullPointerException:
if the buffer is null
IllegalStateException:
if there is no set up header