APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.jimage.decompressor

public Class CompressIndexes

extends Object
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.nio.ByteBuffer, java.util.ArrayList, .List

Index compressor. Use the minimal amount of bytes required to store an integer.

Implementation Note

This class needs to maintain JDK 8 source compatibility. It is used internally in the JDK to implement jimage/jrtfs access, but also compiled and delivered as part of the jrtfs.jar to support access to the jimage file provided by the shipped JDK by tools running on JDK 8.

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static byte[]
compress(int value)

public static int
decompress(byte[] value, int offset)

public static List<Integer>
decompressFlow(byte[] values)

private static int
private static int
private static boolean
isCompressed(byte b)

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

Field Detail

COMPRESSED_FLAGback to summary
private static final int COMPRESSED_FLAG
HEADER_SHIFTback to summary
private static final int HEADER_SHIFT
HEADER_WIDTHback to summary
private static final int HEADER_WIDTH

Constructor Detail

CompressIndexesback to summary
public CompressIndexes()

Method Detail

compressback to summary
public static byte[] compress(int value)
decompressback to summary
public static int decompress(byte[] value, int offset)
decompressFlowback to summary
public static List<Integer> decompressFlow(byte[] values)
getHeaderLengthback to summary
private static int getHeaderLength(byte b)
getHeaderValueback to summary
private static int getHeaderValue(byte b)
isCompressedback to summary
private static boolean isCompressed(byte b)
readIntback to summary
public static int readInt(DataInputStream cr) throws IOException