E - the type of the decorated entry.@ThreadSafe public abstract class DecoratingEntry<E extends Entry> extends UniqueObject implements Entry
Entry.Access, Entry.Entity, Entry.PosixEntity, Entry.Size, Entry.Type| Modifier and Type | Field and Description |
|---|---|
protected E |
entry
The nullable decorated entry.
|
ALL_ACCESS, ALL_POSIX_ACCESS, ALL_POSIX_ENTITIES, ALL_SIZES, ALL_TYPES, DIRECTORY_TYPE, FILE_TYPE, NO_ACCESS, NO_POSIX_ENTITIES, NO_SIZES, NO_TYPES, SPECIAL_TYPE, SYMLINK_TYPE, UNKNOWN| Modifier | Constructor and Description |
|---|---|
protected |
DecoratingEntry() |
protected |
DecoratingEntry(E entry) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the entry name.
|
long |
getSize(Entry.Size type)
Returns the size of the given
type for this entry in bytes or
Entry.UNKNOWN if not defined or the type is not supported. |
long |
getTime(Entry.Access type)
Returns the time of the given access
type for this entry in
milliseconds since the epoch or -1 if not
defined or the type is not supported. |
Boolean |
isPermitted(Entry.Access type,
Entry.Entity entity)
Returns
true or false if the given access type
to this entry for the given entity is respectively permitted or
denied. |
String |
toString()
Returns a string representation of this object for debugging and logging
purposes.
|
equals, hashCodeprotected DecoratingEntry()
protected DecoratingEntry(E entry)
public String getName()
Entry'/' or '\\' or both, according to the rules of the
Container.
This implies that a segment cannot contain separator characters.
".") or
dot-dot ("..") segments which represent the current or
parent segment respectively.
"foo/bar/" and
"./abc/../foo/./def/./../bar/." both refer to the same entry
when being parsed.public long getSize(Entry.Size type)
Entrytype for this entry in bytes or
Entry.UNKNOWN if not defined or the type is not supported.
This method may not be meaningful for non-Entry.Type.FILE entries.getSize in interface Entrytype - the type of the size.type for this entry in bytes or
Entry.UNKNOWN if not defined or the type is not supported.public long getTime(Entry.Access type)
Entrytype for this entry in
milliseconds since the epoch or -1 if not
defined or the type is not supported.public Boolean isPermitted(Entry.Access type, Entry.Entity entity)
Entrytrue or false if the given access type
to this entry for the given entity is respectively permitted or
denied.
Returns null if not defined or the access type or entity is
not supported.isPermitted in interface Entrytype - the type of the access.entity - the entity which desires access.true if and only if the given access type to
this entry is permitted for the given entity.Copyright © 2012–2015 Schlichtherle IT Services. All rights reserved.