| Modifier and Type | Field and Description |
|---|---|
| private int[] | |
| private final Codec | |
| private int | |
| private Codec | |
| private final Codec |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int | decode(final InputStream
the input stream to read from in)Implements abstract org. |
| public int | decode(final InputStream
the input stream to read from in, final long the previous value read, which must be supplied if the codec is a delta encoding last)Implements abstract org. |
| public int[] | decodeInts(final int
the number of values to decode n, final InputStream the input stream to read from in)Overrides org. n values from in.
|
| public byte[] | encode(final int
the value to encode value)Implements abstract org. |
| public byte[] | encode(final int
the value to encode value, final int the previous value encoded (for delta encodings) last)Implements abstract org. |
| public byte[] | |
| public int[] | |
| public Codec | |
| public Codec | |
| public Codec |
| favoured | back to summary |
|---|---|
| private int[] favoured | |
| favouredCodec | back to summary |
|---|---|
| private final Codec favouredCodec | |
| l | back to summary |
|---|---|
| private int l | |
| tokenCodec | back to summary |
|---|---|
| private Codec tokenCodec | |
| unfavouredCodec | back to summary |
|---|---|
| private final Codec unfavouredCodec | |
| PopulationCodec | back to summary |
|---|---|
| public PopulationCodec(final Codec favouredCodec, final Codec tokenCodec, final Codec unvafouredCodec) | |
| PopulationCodec | back to summary |
|---|---|
| public PopulationCodec(final Codec favouredCodec, final int l, final Codec unfavouredCodec) | |
| decode | back to summary |
|---|---|
| public int decode(final InputStream in) throws IOException, Pack200Exception Implements abstract org. Doc from org. Decodes a sequence of bytes from the given input stream, returning the value as a long. Note that this method can only be applied for non-delta encodings.
| |
| decode | back to summary |
|---|---|
| public int decode(final InputStream in, final long last) throws IOException, Pack200Exception Implements abstract org. Doc from org. Decodes a sequence of bytes from the given input stream, returning the value as a long. If this encoding is a delta encoding (d=1) then the previous value must be passed in as a parameter. If it is a non-delta encoding, then it does not matter what value is passed in, so it makes sense for the value to be passed in by default using code similar to:
long last = 0;
while (condition) {
last = codec.decode(in, last);
// do something with last
}
| |
| decodeInts | back to summary |
|---|---|
| public int[] decodeInts(final int n, final InputStream in) throws IOException, Pack200Exception Overrides org. Doc from org. Decodes a sequence of
| |
| encode | back to summary |
|---|---|
| public byte[] encode(final int value) throws Pack200Exception Implements abstract org. Doc from org. Encodes a single value into a sequence of bytes. Note that this method can only be used for non-delta encodings.
| |
| encode | back to summary |
|---|---|
| public byte[] encode(final int value, final int last) throws Pack200Exception Implements abstract org. Doc from org. Encodes a single value into a sequence of bytes.
| |
| encode | back to summary |
|---|---|
| public byte[] encode(final int[] favoured, final int[] tokens, final int[] unfavoured) throws Pack200Exception | |
| getFavoured | back to summary |
|---|---|
| public int[] getFavoured() | |
| getFavouredCodec | back to summary |
|---|---|
| public Codec getFavouredCodec() | |
| getTokenCodec | back to summary |
|---|---|
| public Codec getTokenCodec() | |
| getUnfavouredCodec | back to summary |
|---|---|
| public Codec getUnfavouredCodec() | |