APIdia Launch Partner
Top Description Inners Constructors Methods
jdk.tools.jlink.internal.runtimelink

public Class JimageDiffGenerator

extends Object
Class Inheritance
Imports
java.io.IOException, .InputStream, .UncheckedIOException, java.util.ArrayList, .Arrays, .HashSet, .List, .Set

Generates a delta between packaged modules (as an ImageResource) and an optimized jimage (lib/modules) as an ImageResource. The result can be serialized to a file using ResourceDiff.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
JimageDiffGenerator.ImageResource

A resource used for linking.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private boolean

Returns:

true iff the two streams contain the same number of bytes and each byte of the streams are equal. false otherwise.
compareStreams
(InputStream
The first input stream
is1
,
InputStream
The second input stream
is2
)

Compare the contents of the two input streams (byte-by-byte).

public List<ResourceDiff>

Returns:

The list of resource differences across all modules.
generateDiff
(JimageDiffGenerator.ImageResource
The ImageResource view of unmodified resources coming from packaged modules.
base
,
JimageDiffGenerator.ImageResource
The ImageResource view of the jlink plug-in pipeline having been applied to the resources in base.
image
)

Produce a difference between packaged modules' resources (base) and the result of all plug-ins being applied on those resources (image).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

JimageDiffGeneratorback to summary
public JimageDiffGenerator()

Method Detail

compareStreamsback to summary
private boolean compareStreams(InputStream is1, InputStream is2)

Compare the contents of the two input streams (byte-by-byte).

Parameters
is1:InputStream

The first input stream

is2:InputStream

The second input stream

Returns:boolean

true iff the two streams contain the same number of bytes and each byte of the streams are equal. false otherwise.

generateDiffback to summary
public List<ResourceDiff> generateDiff(JimageDiffGenerator.ImageResource base, JimageDiffGenerator.ImageResource image) throws Exception

Produce a difference between packaged modules' resources (base) and the result of all plug-ins being applied on those resources (image).

Parameters
base:JimageDiffGenerator.ImageResource

The ImageResource view of unmodified resources coming from packaged modules.

image:JimageDiffGenerator.ImageResource

The ImageResource view of the jlink plug-in pipeline having been applied to the resources in base.

Returns:List<ResourceDiff>

The list of resource differences across all modules.

jdk.tools.jlink.internal.runtimelink back to summary

public Interface JimageDiffGenerator.ImageResource

extends AutoCloseable
Known Direct Implementers
jdk.tools.jlink.internal.runtimelink.ResourcePoolReader
Annotations
@SuppressWarnings:try

A resource used for linking. Either packaged modules or packaged modules transformed to an optimized run-time image by applying the jlink plug-in pipeline. The canonical source, the packaged modules, are being used to devise the delta to the transformed run-time image. The delta can can then be used for jlink input together *with* a prepared run-time image.

Method Summary

Modifier and TypeMethod and Description
public List<String>
public InputStream
public byte[]
Inherited from java.lang.AutoCloseable:
close

Method Detail

getEntriesback to summary
public List<String> getEntries()
getResourceback to summary
public InputStream getResource(String name)
getResourceBytesback to summary
public byte[] getResourceBytes(String name)