TrueZIP Kernel 7.0-rc2

de.schlichtherle.truezip.fs.archive
Interface FsArchiveEntry

All Superinterfaces:
Entry

public interface FsArchiveEntry
extends Entry

Represents an entry in an archive file. Archive drivers need to implement this interface in order to enable their client (i.e. archive controllers) to read and write archive entries from and to archive files of their respective supported type.

Implementations do not need to be thread-safe.

Author:
Christian Schlichtherle

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.schlichtherle.truezip.entry.Entry
Entry.Access, Entry.Size, Entry.Type
 
Field Summary
 
Fields inherited from interface de.schlichtherle.truezip.entry.Entry
NULL, UNKNOWN
 
Method Summary
 boolean setSize(Entry.Size type, long value)
          Sets the size of this archive entry.
 boolean setTime(Entry.Access type, long value)
          Sets the last access time of this archive entry.
 
Methods inherited from interface de.schlichtherle.truezip.entry.Entry
getName, getSize, getTime, getType
 

Method Detail

setSize

boolean setSize(@NonNull
                Entry.Size type,
                long value)
Sets the size of this archive entry.

Parameters:
type - the size type.
value - the size of the given size type for this archive entry in bytes or -1.
Returns:
true on success, false otherwise, e.g. if the type is unsupported.
Throws:
NullPointerException - if type is null.
IllegalArgumentException - if value is negative and not -1.

setTime

boolean setTime(@NonNull
                Entry.Access type,
                long value)
Sets the last access time of this archive entry.

Parameters:
type - the access type.
value - the last time of the given access type for this archive entry in milliseconds since the epoch or -1.
Returns:
true on success, false otherwise, e.g. if the given type is unsupported.
Throws:
NullPointerException - if type is null.
IllegalArgumentException - if value is negative and not -1.

TrueZIP Kernel 7.0-rc2

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.