TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.entry
Interface EntryFactory<E extends Entry>

Type Parameters:
E - The type of the created entries.
All Known Implementing Classes:
FsArchiveDriver, FsCharsetArchiveDriver

public interface EntryFactory<E extends Entry>

A factory for entries.

Author:
Christian Schlichtherle

Method Summary
 E newEntry(String name, Entry.Type type, Entry template)
          Returns a new entry for the given name.
 

Method Detail

newEntry

@NonNull
E newEntry(@NonNull
                   String name,
                   @NonNull
                   Entry.Type type,
                   @CheckForNull
                   Entry template)
                         throws CharConversionException
Returns a new entry for the given name. The implementation may need to fix this name in order to form a valid entry name for their particular requirements.

If template is not null, then the returned entry shall inherit as much properties from this template as possible - with the exception of its name and type. Furthermore, if name and type are equal to the name and type of this template, then the returned entry shall be a clone of the template which shares no mutable objects with the template.

Parameters:
name - an entry name.
type - an entry type.
template - if not null, then the new entry shall inherit as much properties from this entry as possible - with the exception of its name and type.
Returns:
A new entry for the given name.
Throws:
CharConversionException - if name contains characters which are invalid.

TrueZIP Kernel 7.0-rc1

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