APIdia Launch Partner
Top Description Fields Constructors Methods
jdk.internal.jrtfs

pack-priv final Class JrtFileAttributes

extends Object
implements BasicFileAttributes
Class Inheritance
All Implemented Interfaces
java.nio.file.attribute.BasicFileAttributes
Imports
java.nio.file.attribute.BasicFileAttributes, .FileTime, java.util.Formatter, jdk.internal.jimage.ImageReader.Node

File attributes implementation for jrt image file system.

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 final ImageReader.Node

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the compressed resource size for compressed resources.
compressedSize
()

Compressed resource file.

public FileTime
public String

Returns:

extension string for the file resource
extension
()

"file" extension of a file resource.

public Object
fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available.

public boolean
isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

public boolean
isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

public boolean
isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

public FileTime
lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

public FileTime
lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

public long
size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes).

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

nodeback to summary
private final ImageReader.Node node

Constructor Detail

JrtFileAttributesback to summary
pack-priv JrtFileAttributes(ImageReader.Node node)

Method Detail

compressedSizeback to summary
public long compressedSize()

Compressed resource file. If not available or not applicable, 0L is returned.

Returns:long

the compressed resource size for compressed resources.

creationTimeback to summary
public FileTime creationTime()

Implements java.nio.file.attribute.BasicFileAttributes.creationTime.

Doc from java.nio.file.attribute.BasicFileAttributes.creationTime.

Returns the creation time. The creation time is the time that the file was created.

If the file system implementation does not support a time stamp to indicate the time when the file was created then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
extensionback to summary
public String extension()

"file" extension of a file resource.

Returns:String

extension string for the file resource

fileKeyback to summary
public Object fileKey()

Implements java.nio.file.attribute.BasicFileAttributes.fileKey.

Doc from java.nio.file.attribute.BasicFileAttributes.fileKey.

Returns an object that uniquely identifies the given file, or null if a file key is not available. On some platforms or file systems it is possible to use an identifier, or a combination of identifiers to uniquely identify a file. Such identifiers are important for operations such as file tree traversal in file systems that support symbolic links or file systems that allow a file to be an entry in more than one directory. On UNIX file systems, for example, the device ID and inode are commonly used for such purposes.

The file key returned by this method can only be guaranteed to be unique if the file system and files remain static. Whether a file system re-uses identifiers after a file is deleted is implementation dependent and therefore unspecified.

File keys returned by this method can be compared for equality and are suitable for use in collections. If the file system and files remain static, and two files are the same with non-null file keys, then their file keys are equal.

Annotations
@Override
isDirectoryback to summary
public boolean isDirectory()

Implements java.nio.file.attribute.BasicFileAttributes.isDirectory.

Doc from java.nio.file.attribute.BasicFileAttributes.isDirectory.

Tells whether the file is a directory.

Annotations
@Override
isOtherback to summary
public boolean isOther()

Implements java.nio.file.attribute.BasicFileAttributes.isOther.

Doc from java.nio.file.attribute.BasicFileAttributes.isOther.

Tells whether the file is something other than a regular file, directory, or symbolic link.

Annotations
@Override
isRegularFileback to summary
public boolean isRegularFile()

Implements java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Doc from java.nio.file.attribute.BasicFileAttributes.isRegularFile.

Tells whether the file is a regular file with opaque content.

Annotations
@Override
lastAccessTimeback to summary
public FileTime lastAccessTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastAccessTime.

Returns the time of last access.

If the file system implementation does not support a time stamp to indicate the time of last access then this method returns an implementation specific default value, typically the last-modified-time or a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
lastModifiedTimeback to summary
public FileTime lastModifiedTime()

Implements java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Doc from java.nio.file.attribute.BasicFileAttributes.lastModifiedTime.

Returns the time of last modification.

If the file system implementation does not support a time stamp to indicate the time of last modification then this method returns an implementation specific default value, typically a FileTime representing the epoch (1970-01-01T00:00:00Z).

Annotations
@Override
sizeback to summary
public long size()

Implements java.nio.file.attribute.BasicFileAttributes.size.

Doc from java.nio.file.attribute.BasicFileAttributes.size.

Returns the size of the file (in bytes). The size may differ from the actual size on the file system due to compression, support for sparse files, or other reasons. The size of files that are not regular files is implementation specific and therefore unspecified.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override