Top Description Fields Constructors Methods
jdk.tools.jlink.internal

pack-priv Class ByteArrayResourcePoolEntry

extends AbstractResourcePoolEntry
Class Inheritance
Known Direct Subclasses
jdk.tools.jlink.internal.ResourcePoolManager.CompressedModuleData
Imports
java.io.ByteArrayInputStream, .IOException, .InputStream, .OutputStream, .UncheckedIOException, java.util.Objects

A ResourcePoolEntry backed by a given byte[].

Field Summary

Modifier and TypeField and Description
private final byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
ByteArrayResourcePoolEntry(String
The module name.
module
,
String
The data path identifier.
path
,
ResourcePoolEntry.Type
The data type.
type
,
byte[]
The byte buffer.
buffer
)

Create a new ByteArrayResourcePoolEntry.

Method Summary

Modifier and TypeMethod and Description
public InputStream
content()

Implements jdk.tools.jlink.plugin.ResourcePoolEntry.content.

The ResourcePoolEntry content as an InputStream.

public byte[]
contentBytes()

Overrides default jdk.tools.jlink.plugin.ResourcePoolEntry.contentBytes.

The ResourcePoolEntry content as an array of bytes.

public long
contentLength()

Implements jdk.tools.jlink.plugin.ResourcePoolEntry.contentLength.

The ResourcePoolEntry content length.

public void
write(OutputStream
the output stream
out
)

Overrides default jdk.tools.jlink.plugin.ResourcePoolEntry.write.

Write the content of this ResourcePoolEntry to an OutputStream.

Inherited from jdk.tools.jlink.internal.AbstractResourcePoolEntry:
equalshashCodemoduleNamepathtoStringtype

Field Detail

bufferback to summary
private final byte[] buffer

Constructor Detail

ByteArrayResourcePoolEntryback to summary
pack-priv ByteArrayResourcePoolEntry(String module, String path, ResourcePoolEntry.Type type, byte[] buffer)

Create a new ByteArrayResourcePoolEntry.

Parameters
module:String

The module name.

path:String

The data path identifier.

type:ResourcePoolEntry.Type

The data type.

buffer:byte[]

The byte buffer.

Method Detail

contentback to summary
public InputStream content()

Implements jdk.tools.jlink.plugin.ResourcePoolEntry.content.

Doc from jdk.tools.jlink.plugin.ResourcePoolEntry.content.

The ResourcePoolEntry content as an InputStream.

Returns:InputStream

The resource content as an InputStream.

Annotations
@Override
contentBytesback to summary
public byte[] contentBytes()

Overrides default jdk.tools.jlink.plugin.ResourcePoolEntry.contentBytes.

Doc from jdk.tools.jlink.plugin.ResourcePoolEntry.contentBytes.

The ResourcePoolEntry content as an array of bytes.

Returns:byte[]

An Array of bytes.

Annotations
@Override
contentLengthback to summary
public long contentLength()

Implements jdk.tools.jlink.plugin.ResourcePoolEntry.contentLength.

Doc from jdk.tools.jlink.plugin.ResourcePoolEntry.contentLength.

The ResourcePoolEntry content length.

Returns:long

The content length.

Annotations
@Override
writeback to summary
public void write(OutputStream out)

Overrides default jdk.tools.jlink.plugin.ResourcePoolEntry.write.

Doc from jdk.tools.jlink.plugin.ResourcePoolEntry.write.

Write the content of this ResourcePoolEntry to an OutputStream.

Parameters
out:OutputStream

the output stream

Annotations
@Override