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

public final Class CompressedResourceHeader

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .ByteOrder, java.util.Objects

A resource header for compressed resource. This class is handled internally, you don't have to add header to the resource, headers are added automatically for compressed resources.

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 final long
private static final int
private final int
private static final int
private final boolean
public static final int
private static final int
private static final int
private static final int
private final long

Constructor Summary

AccessConstructor and Description
public
CompressedResourceHeader(long compressedSize, long uncompressedSize, int decompressorNameOffset, boolean isTerminal)

Method Summary

Modifier and TypeMethod and Description
public byte[]
public int
public long
public static int
public long
public boolean
public static CompressedResourceHeader
readFromResource(ByteOrder order, byte[] resource)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

COMPRESSED_OFFSETback to summary
private static final int COMPRESSED_OFFSET
compressedSizeback to summary
private final long compressedSize
DECOMPRESSOR_NAME_OFFSETback to summary
private static final int DECOMPRESSOR_NAME_OFFSET
decompressorNameOffsetback to summary
private final int decompressorNameOffset
IS_TERMINAL_OFFSETback to summary
private static final int IS_TERMINAL_OFFSET
isTerminalback to summary
private final boolean isTerminal
MAGICback to summary
public static final int MAGIC
MAGIC_OFFSETback to summary
private static final int MAGIC_OFFSET
SIZEback to summary
private static final int SIZE
UNCOMPRESSED_OFFSETback to summary
private static final int UNCOMPRESSED_OFFSET
uncompressedSizeback to summary
private final long uncompressedSize

Constructor Detail

CompressedResourceHeaderback to summary
public CompressedResourceHeader(long compressedSize, long uncompressedSize, int decompressorNameOffset, boolean isTerminal)

Method Detail

getBytesback to summary
public byte[] getBytes(ByteOrder order)
getDecompressorNameOffsetback to summary
public int getDecompressorNameOffset()
getResourceSizeback to summary
public long getResourceSize()
getSizeback to summary
public static int getSize()
getUncompressedSizeback to summary
public long getUncompressedSize()
isTerminalback to summary
public boolean isTerminal()
readFromResourceback to summary
public static CompressedResourceHeader readFromResource(ByteOrder order, byte[] resource)