TrueZIP Kernel 7.0-rc1

de.schlichtherle.truezip.fs.archive
Class FsDefaultArchiveController.DummyInputService<E extends Entry>

java.lang.Object
  extended by de.schlichtherle.truezip.fs.archive.FsDefaultArchiveController.DummyInputService<E>
All Implemented Interfaces:
EntryContainer<E>, InputService<E>, InputShop<E>, Closeable, Iterable<E>
Enclosing class:
FsDefaultArchiveController<E extends FsArchiveEntry>

private static final class FsDefaultArchiveController.DummyInputService<E extends Entry>
extends Object
implements InputShop<E>

A dummy input service to substitute for null.


Constructor Summary
private FsDefaultArchiveController.DummyInputService()
           
 
Method Summary
 void close()
           
 E getEntry(String name)
          Returns the entry for the given name or null if no entry with this name exists in this container.
 InputSocket<? extends E> getInputSocket(String name)
          Returns an input socket for read access to the given entry.
 int getSize()
          Returns the number of entries in this container.
 Iterator<E> iterator()
          Returns a new iterator over all entries in this container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FsDefaultArchiveController.DummyInputService

private FsDefaultArchiveController.DummyInputService()
Method Detail

close

public void close()
           throws IOException
Specified by:
close in interface Closeable
Throws:
IOException

getSize

public int getSize()
Description copied from interface: EntryContainer
Returns the number of entries in this container.

Specified by:
getSize in interface EntryContainer<E extends Entry>

iterator

public Iterator<E> iterator()
Description copied from interface: EntryContainer
Returns a new iterator over all entries in this container.

First, the iteration must be consistent: Multiple iterators must iterate the same entries in the same order again unless the set of entries has changed.

Next, the iteration should also reflect the natural order of the entries in this container. For example, if this container represents an archive file, the iteration should reflect the natural order of the entries in the archive file.

Specified by:
iterator in interface EntryContainer<E extends Entry>
Specified by:
iterator in interface Iterable<E extends Entry>
Returns:
A new non-null iterator over all entries in this container.

getEntry

public E getEntry(String name)
Description copied from interface: EntryContainer
Returns the entry for the given name or null if no entry with this name exists in this container.

Specified by:
getEntry in interface EntryContainer<E extends Entry>
Parameters:
name - an entry name.
Returns:
The entry for the given name or null if no entry with this name exists in this container.

getInputSocket

public InputSocket<? extends E> getInputSocket(String name)
Description copied from interface: InputService
Returns an input socket for read access to the given entry.

Specified by:
getInputSocket in interface InputService<E extends Entry>
Parameters:
name - a non-null entry name.
Returns:
An input socket for reading from the local target.

TrueZIP Kernel 7.0-rc1

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