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

public Class StringSharingDecompressor

extends Object
implements ResourceDecompressor
Class Inheritance
All Implemented Interfaces
jdk.internal.jimage.decompressor.ResourceDecompressor
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .DataInputStream, .DataOutputStream, .IOException, java.nio.ByteBuffer, .ByteOrder, java.util.Arrays, .List

A Decompressor that reconstructs the constant pool of classes.

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
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
public static final int
public static final int
private static final int[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public byte[]
decompress(ResourceDecompressor.StringsProvider reader, byte[] content, int offset, long originalSize)

Implements jdk.internal.jimage.decompressor.ResourceDecompressor.decompress.

Decompress a resource.

public static byte[]
public String
public static int[]
public static byte[]
normalize(ResourceDecompressor.StringsProvider provider, byte[] transformed, int offset)

private static String
private static ByteBuffer
safeAdd(ByteBuffer current, byte b)

private static ByteBuffer
safeAdd(ByteBuffer current, byte[] bytes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONSTANT_Classback to summary
private static final int CONSTANT_Class
CONSTANT_Doubleback to summary
private static final int CONSTANT_Double
CONSTANT_Fieldrefback to summary
private static final int CONSTANT_Fieldref
CONSTANT_Floatback to summary
private static final int CONSTANT_Float
CONSTANT_Integerback to summary
private static final int CONSTANT_Integer
CONSTANT_InterfaceMethodrefback to summary
private static final int CONSTANT_InterfaceMethodref
CONSTANT_InvokeDynamicback to summary
private static final int CONSTANT_InvokeDynamic
CONSTANT_Longback to summary
private static final int CONSTANT_Long
CONSTANT_MethodHandleback to summary
private static final int CONSTANT_MethodHandle
CONSTANT_Methodrefback to summary
private static final int CONSTANT_Methodref
CONSTANT_MethodTypeback to summary
private static final int CONSTANT_MethodType
CONSTANT_Moduleback to summary
private static final int CONSTANT_Module
CONSTANT_NameAndTypeback to summary
private static final int CONSTANT_NameAndType
CONSTANT_Packageback to summary
private static final int CONSTANT_Package
CONSTANT_Stringback to summary
private static final int CONSTANT_String
CONSTANT_Utf8back to summary
private static final int CONSTANT_Utf8
EXTERNALIZED_STRINGback to summary
public static final int EXTERNALIZED_STRING
EXTERNALIZED_STRING_DESCRIPTORback to summary
public static final int EXTERNALIZED_STRING_DESCRIPTOR
SIZESback to summary
private static final int[] SIZES

Constructor Detail

StringSharingDecompressorback to summary
public StringSharingDecompressor()

Method Detail

decompressback to summary
public byte[] decompress(ResourceDecompressor.StringsProvider reader, byte[] content, int offset, long originalSize) throws Exception

Implements jdk.internal.jimage.decompressor.ResourceDecompressor.decompress.

Doc from jdk.internal.jimage.decompressor.ResourceDecompressor.decompress.

Decompress a resource.

Annotations
@Override
getEncodedback to summary
public static byte[] getEncoded(String pre) throws IOException
getNameback to summary
public String getName()

Implements jdk.internal.jimage.decompressor.ResourceDecompressor.getName.

Doc from jdk.internal.jimage.decompressor.ResourceDecompressor.getName.

Decompressor unique name.

Annotations
@Override
getSizesback to summary
public static int[] getSizes()
normalizeback to summary
public static byte[] normalize(ResourceDecompressor.StringsProvider provider, byte[] transformed, int offset) throws IOException
Annotations
@SuppressWarnings:fallthrough
reconstructback to summary
private static String reconstruct(ResourceDecompressor.StringsProvider reader, DataInputStream cr) throws IOException
safeAddback to summary
private static ByteBuffer safeAdd(ByteBuffer current, byte b)
safeAddback to summary
private static ByteBuffer safeAdd(ByteBuffer current, byte[] bytes)