APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.internal.net.http.hpack

public final Class QuickHuffman

extends Object
Class Inheritance
Imports
jdk.internal.net.http.hpack.HPACK.BufferUpdateConsumer, java.io.IOException, java.nio.ByteBuffer, java.util.List, .Objects

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static interface
public static class
pack-priv static class
public static class

Field Summary

Modifier and TypeField and Description
private static final long[]
private static final int
private static final int
private static final long
private static final QuickHuffman.Node

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static void
addChar(QuickHuffman.Node root, int symbol, int code, int bitLength)

private static void
addEOS(QuickHuffman.Node root, int symbol, int code, int bitLength)

private static void
addLeaf(QuickHuffman.Node root, char symbol, int code, int bitLength, boolean isEOS)

private static QuickHuffman.Node
private static int
codeLengthOf(char c)

private static long
codeValueOf(char c)

public static boolean
public static int
lengthOf(CharSequence value, int start, int end)

public static int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

codesback to summary
private static final long[] codes
EOS_LENGTHback to summary
private static final int EOS_LENGTH
EOS_LSBback to summary
private static final int EOS_LSB
EOS_MSBback to summary
private static final long EOS_MSB
rootback to summary
private static final QuickHuffman.Node root

Constructor Detail

QuickHuffmanback to summary
private QuickHuffman()

Method Detail

addCharback to summary
private static void addChar(QuickHuffman.Node root, int symbol, int code, int bitLength)
addEOSback to summary
private static void addEOS(QuickHuffman.Node root, int symbol, int code, int bitLength)
addLeafback to summary
private static void addLeaf(QuickHuffman.Node root, char symbol, int code, int bitLength, boolean isEOS)
buildTrieback to summary
private static QuickHuffman.Node buildTrie()
codeLengthOfback to summary
private static int codeLengthOf(char c)
codeValueOfback to summary
private static long codeValueOf(char c)
isHuffmanBetterForback to summary
public static boolean isHuffmanBetterFor(CharSequence input)
lengthOfback to summary
public static int lengthOf(CharSequence value, int start, int end)
lengthOfback to summary
public static int lengthOf(CharSequence value)
jdk.internal.net.http.hpack back to summary

pack-priv final Class QuickHuffman.ImmutableNode

extends Object
implements Node
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.hpack.QuickHuffman.Node

Field Summary

Modifier and TypeField and Description
private final List<QuickHuffman.ImmutableNode>
private final boolean
private final int
private final char

Constructor Summary

AccessConstructor and Description
private
ImmutableNode(char symbol, boolean eosPath, int length)

private
ImmutableNode(boolean eosPath, int length, QuickHuffman.ImmutableNode[] children)

Method Summary

Modifier and TypeMethod and Description
public static QuickHuffman.ImmutableNode
public QuickHuffman.ImmutableNode
public QuickHuffman.ImmutableNode[]
public int
public QuickHuffman.ImmutableNode
public char
public boolean
public boolean
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childrenback to summary
private final List<QuickHuffman.ImmutableNode> children
eosPathback to summary
private final boolean eosPath
lengthback to summary
private final int length
symbolback to summary
private final char symbol

Constructor Detail

ImmutableNodeback to summary
private ImmutableNode(char symbol, boolean eosPath, int length)
ImmutableNodeback to summary
private ImmutableNode(boolean eosPath, int length, QuickHuffman.ImmutableNode[] children)

Method Detail

copyOfback to summary
public static QuickHuffman.ImmutableNode copyOf(QuickHuffman.Node node)
getChildback to summary
public QuickHuffman.ImmutableNode getChild(int index)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getChild.

Annotations
@Override
getChildrenback to summary
public QuickHuffman.ImmutableNode[] getChildren()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getChildren.

Annotations
@Override
getLengthback to summary
public int getLength()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getLength.

Annotations
@Override
getOrCreateChildback to summary
public QuickHuffman.ImmutableNode getOrCreateChild(int index)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getOrCreateChild.

Annotations
@Override
getSymbolback to summary
public char getSymbol()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getSymbol.

Annotations
@Override
isEOSPathback to summary
public boolean isEOSPath()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.isEOSPath.

Annotations
@Override
isLeafback to summary
public boolean isLeaf()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.isLeaf.

Annotations
@Override
setEOSPathback to summary
public void setEOSPath(boolean value)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setEOSPath.

Annotations
@Override
setLengthback to summary
public void setLength(int value)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setLength.

Annotations
@Override
setSymbolback to summary
public void setSymbol(char symbol)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setSymbol.

Annotations
@Override
jdk.internal.net.http.hpack back to summary

pack-priv Interface QuickHuffman.Node

Known Direct Implementers
jdk.internal.net.http.hpack.QuickHuffman.TemporaryNode, jdk.internal.net.http.hpack.QuickHuffman.ImmutableNode

Method Summary

Modifier and TypeMethod and Description
public QuickHuffman.Node
getChild(int index)

public QuickHuffman.Node[]
public int
public QuickHuffman.Node
getOrCreateChild(int index)

public char
public boolean
public boolean
public void
setEOSPath(boolean value)

public void
setLength(int value)

public void
setSymbol(char symbol)

Method Detail

getChildback to summary
public QuickHuffman.Node getChild(int index)
getChildrenback to summary
public QuickHuffman.Node[] getChildren()
getLengthback to summary
public int getLength()
getOrCreateChildback to summary
public QuickHuffman.Node getOrCreateChild(int index)
getSymbolback to summary
public char getSymbol()
isEOSPathback to summary
public boolean isEOSPath()
isLeafback to summary
public boolean isLeaf()
setEOSPathback to summary
public void setEOSPath(boolean value)
setLengthback to summary
public void setLength(int value)
setSymbolback to summary
public void setSymbol(char symbol)
jdk.internal.net.http.hpack back to summary

public final Class QuickHuffman.Reader

extends Object
implements Reader
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.hpack.Huffman.Reader

Field Summary

Modifier and TypeField and Description
private long
private int
private QuickHuffman.Node
private boolean
private int
private final HPACK.BufferUpdateConsumer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
read(ByteBuffer source, Appendable destination, boolean isLast)

Implements jdk.internal.net.http.hpack.Huffman.Reader.read.

public void
reset()

Implements jdk.internal.net.http.hpack.Huffman.Reader.reset.

Brings this reader to the state it had upon construction.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private long buffer
bufferLenback to summary
private int bufferLen
currback to summary
private QuickHuffman.Node curr
doneback to summary
private boolean done
lenback to summary
private int len
UPDATERback to summary
private final HPACK.BufferUpdateConsumer UPDATER

Constructor Detail

Readerback to summary
public Reader()

Method Detail

readback to summary
public void read(ByteBuffer source, Appendable destination, boolean isLast) throws IOException

Implements jdk.internal.net.http.hpack.Huffman.Reader.read.

Annotations
@Override
resetback to summary
public void reset()

Implements jdk.internal.net.http.hpack.Huffman.Reader.reset.

Doc from jdk.internal.net.http.hpack.Huffman.Reader.reset.

Brings this reader to the state it had upon construction.

Annotations
@Override
jdk.internal.net.http.hpack back to summary

pack-priv final Class QuickHuffman.TemporaryNode

extends Object
implements Node
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.hpack.QuickHuffman.Node

Field Summary

Modifier and TypeField and Description
private QuickHuffman.TemporaryNode[]
private boolean
private int
private char

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public QuickHuffman.TemporaryNode
public QuickHuffman.Node[]
public int
public QuickHuffman.TemporaryNode
public char
public boolean
public boolean
public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

childrenback to summary
private QuickHuffman.TemporaryNode[] children
eosPathback to summary
private boolean eosPath
lengthback to summary
private int length
symbolback to summary
private char symbol

Constructor Detail

TemporaryNodeback to summary
pack-priv TemporaryNode()

Method Detail

ensureChildrenExistback to summary
private void ensureChildrenExist()
getChildback to summary
public QuickHuffman.TemporaryNode getChild(int index)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getChild.

Annotations
@Override
getChildrenback to summary
public QuickHuffman.Node[] getChildren()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getChildren.

Annotations
@Override
getLengthback to summary
public int getLength()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getLength.

Annotations
@Override
getOrCreateChildback to summary
public QuickHuffman.TemporaryNode getOrCreateChild(int index)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getOrCreateChild.

Annotations
@Override
getSymbolback to summary
public char getSymbol()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.getSymbol.

Annotations
@Override
isEOSPathback to summary
public boolean isEOSPath()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.isEOSPath.

Annotations
@Override
isLeafback to summary
public boolean isLeaf()

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.isLeaf.

Annotations
@Override
setEOSPathback to summary
public void setEOSPath(boolean value)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setEOSPath.

Annotations
@Override
setLengthback to summary
public void setLength(int value)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setLength.

Annotations
@Override
setSymbolback to summary
public void setSymbol(char value)

Implements jdk.internal.net.http.hpack.QuickHuffman.Node.setSymbol.

Annotations
@Override
jdk.internal.net.http.hpack back to summary

public final Class QuickHuffman.Writer

extends Object
implements Writer
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.hpack.Huffman.Writer

Field Summary

Modifier and TypeField and Description
private long
private int
private int
private boolean
private int
private CharSequence
private final HPACK.BufferUpdateConsumer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public QuickHuffman.Writer
public int
lengthOf(CharSequence value, int start, int end)

Implements jdk.internal.net.http.hpack.Huffman.Writer.lengthOf.

Calculates the number of bytes required to represent a subsequence of the given CharSequence using the Huffman coding.

public QuickHuffman.Writer
reset()

Implements jdk.internal.net.http.hpack.Huffman.Writer.reset.

Brings this writer to the state it had upon construction.

public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private long buffer
bufferLenback to summary
private int bufferLen
endback to summary
private int end
paddedback to summary
private boolean padded
posback to summary
private int pos
sourceback to summary
private CharSequence source
UPDATERback to summary
private final HPACK.BufferUpdateConsumer UPDATER

Constructor Detail

Writerback to summary
public Writer()

Method Detail

fromback to summary
public QuickHuffman.Writer from(CharSequence input, int start, int end)

Implements jdk.internal.net.http.hpack.Huffman.Writer.from.

Annotations
@Override
lengthOfback to summary
public int lengthOf(CharSequence value, int start, int end)

Implements jdk.internal.net.http.hpack.Huffman.Writer.lengthOf.

Doc from jdk.internal.net.http.hpack.Huffman.Writer.lengthOf.

Calculates the number of bytes required to represent a subsequence of the given CharSequence using the Huffman coding.

Annotations
@Override
resetback to summary
public QuickHuffman.Writer reset()

Implements jdk.internal.net.http.hpack.Huffman.Writer.reset.

Doc from jdk.internal.net.http.hpack.Huffman.Writer.reset.

Brings this writer to the state it had upon construction.

Annotations
@Override
writeback to summary
public boolean write(ByteBuffer destination)

Implements jdk.internal.net.http.hpack.Huffman.Writer.write.

Annotations
@Override