APIdia Launch Partner
Top Inners Fields Constructors Methods
jdk.nio.zipfs

pack-priv Class ZipFileAttributeView

extends Object
implements BasicFileAttributeView
Class Inheritance
All Implemented Interfaces
java.nio.file.attribute.BasicFileAttributeView, java.nio.file.attribute.FileAttributeView, java.nio.file.attribute.AttributeView
Known Direct Subclasses
jdk.nio.zipfs.ZipPosixFileAttributeView
Imports
java.io.IOException, java.nio.file.attribute.BasicFileAttributeView, .BasicFileAttributes, .FileTime, .PosixFilePermission, java.util.LinkedHashMap, .Map, .Set

Author
Xueming Shen, Rajendra Gutupalli, Jaya Hangal

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final boolean
pack-priv final ZipPath

Constructor Summary

AccessConstructor and Description
pack-priv
ZipFileAttributeView(ZipPath path, boolean isZipView)

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
public String
name()

Implements java.nio.file.attribute.BasicFileAttributeView.name.

Returns the name of the attribute view.

public BasicFileAttributes
readAttributes()

Implements java.nio.file.attribute.BasicFileAttributeView.readAttributes.

Reads the basic file attributes as a bulk operation.

pack-priv Map<String, Object>
readAttributes(String attributes)

pack-priv void
setAttribute(String attribute, Object value)

public void
public void
setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime)

Implements java.nio.file.attribute.BasicFileAttributeView.setTimes.

Updates any or all of the file's last modified time, last access time, and create time attributes.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isZipViewback to summary
private final boolean isZipView
pathback to summary
pack-priv final ZipPath path

Constructor Detail

ZipFileAttributeViewback to summary
pack-priv ZipFileAttributeView(ZipPath path, boolean isZipView)

Method Detail

attributeback to summary
pack-priv Object attribute(ZipFileAttributeView.AttrID id, ZipFileAttributes zfas)
nameback to summary
public String name()

Implements java.nio.file.attribute.BasicFileAttributeView.name.

Doc from java.nio.file.attribute.BasicFileAttributeView.name.

Returns the name of the attribute view. Attribute views of this type have the name "basic".

Annotations
@Override
readAttributesback to summary
public BasicFileAttributes readAttributes() throws IOException

Implements java.nio.file.attribute.BasicFileAttributeView.readAttributes.

Doc from java.nio.file.attribute.BasicFileAttributeView.readAttributes.

Reads the basic file attributes as a bulk operation.

It is implementation specific if all file attributes are read as an atomic operation with respect to other file system operations.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
readAttributesback to summary
pack-priv Map<String, Object> readAttributes(String attributes) throws IOException
setAttributeback to summary
pack-priv void setAttribute(String attribute, Object value) throws IOException
Annotations
@SuppressWarnings:unchecked
setPermissionsback to summary
public void setPermissions(Set<PosixFilePermission> perms) throws IOException
setTimesback to summary
public void setTimes(FileTime lastModifiedTime, FileTime lastAccessTime, FileTime createTime) throws IOException

Implements java.nio.file.attribute.BasicFileAttributeView.setTimes.

Doc from java.nio.file.attribute.BasicFileAttributeView.setTimes.

Updates any or all of the file's last modified time, last access time, and create time attributes.

This method updates the file's timestamp attributes. The values are converted to the epoch and precision supported by the file system. Converting from finer to coarser granularities results in precision loss. The behavior of this method when attempting to set a timestamp that is not supported or to a value that is outside the range supported by the underlying file store is not defined. It may or not fail by throwing an IOException.

If any of the lastModifiedTime, lastAccessTime, or createTime parameters has the value null then the corresponding timestamp is not changed. An implementation may require to read the existing values of the file attributes when only some, but not all, of the timestamp attributes are updated. Consequently, this method may not be an atomic operation with respect to other file system operations. Reading and re-writing existing values may also result in precision loss. If all of the lastModifiedTime, lastAccessTime and createTime parameters are null then this method has no effect.

Usage Example: Suppose we want to change a file's last access time.

Path path = ... FileTime time = ... Files.getFileAttributeView(path, BasicFileAttributeView.class).setTimes(null, time, null);
Path path = ...
FileTime time = ...
Files.getFileAttributeView(path, BasicFileAttributeView.class).setTimes(null, time, null);
Annotations
@Override
Exceptions
IOException:
if an I/O error occurs
jdk.nio.zipfs back to summary

pack-priv final Enum ZipFileAttributeView.AttrID

extends Enum<ZipFileAttributeView.AttrID>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID
public static final ZipFileAttributeView.AttrID

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ZipFileAttributeView.AttrID
public static ZipFileAttributeView.AttrID[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

compressedSizeback to summary
public static final ZipFileAttributeView.AttrID compressedSize
crcback to summary
public static final ZipFileAttributeView.AttrID crc
creationTimeback to summary
public static final ZipFileAttributeView.AttrID creationTime
fileKeyback to summary
public static final ZipFileAttributeView.AttrID fileKey
groupback to summary
public static final ZipFileAttributeView.AttrID group
isDirectoryback to summary
public static final ZipFileAttributeView.AttrID isDirectory
isOtherback to summary
public static final ZipFileAttributeView.AttrID isOther
isRegularFileback to summary
public static final ZipFileAttributeView.AttrID isRegularFile
lastAccessTimeback to summary
public static final ZipFileAttributeView.AttrID lastAccessTime
lastModifiedTimeback to summary
public static final ZipFileAttributeView.AttrID lastModifiedTime
methodback to summary
public static final ZipFileAttributeView.AttrID method
ownerback to summary
public static final ZipFileAttributeView.AttrID owner
permissionsback to summary
public static final ZipFileAttributeView.AttrID permissions
sizeback to summary
public static final ZipFileAttributeView.AttrID size

Constructor Detail

AttrIDback to summary
private AttrID()

Method Detail

valueOfback to summary
public static ZipFileAttributeView.AttrID valueOf(String name)
valuesback to summary
public static ZipFileAttributeView.AttrID[] values()