org.ow2.util.archive.impl
Class FileArchiveImpl

java.lang.Object
  extended by org.ow2.util.archive.impl.FileArchiveImpl
All Implemented Interfaces:
IArchive, IFileArchive

public class FileArchiveImpl
extends Object
implements IFileArchive

An implementation for the IFileArchive class.

Author:
mleduque

Constructor Summary
FileArchiveImpl()
          Constructor with no arguments.
FileArchiveImpl(File file)
          Constructs a file archive wit the given file.
 
Method Summary
 boolean close()
          
 Iterator<String> getEntries()
          
 File getFile()
          
 IArchiveMetadata getMetadata()
          
 String getName()
          
 URL getResource(String resourceName)
          
 Iterator<URL> getResources()
          
 Iterator<URL> getResources(String resourceName)
          
 URL getURL()
          
 void setFile(File file)
          
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileArchiveImpl

public FileArchiveImpl()
Constructor with no arguments.


FileArchiveImpl

public FileArchiveImpl(File file)
Constructs a file archive wit the given file.

Parameters:
file - the given file
Method Detail

setFile

public void setFile(File file)

Specified by:
setFile in interface IFileArchive

getFile

public File getFile()

Specified by:
getFile in interface IFileArchive

close

public boolean close()

Specified by:
close in interface IArchive

getMetadata

public IArchiveMetadata getMetadata()

Specified by:
getMetadata in interface IArchive

getName

public String getName()

Specified by:
getName in interface IArchive

getResource

public URL getResource(String resourceName)
                throws ArchiveException

Specified by:
getResource in interface IArchive
Throws:
ArchiveException

getResources

public Iterator<URL> getResources()
                           throws ArchiveException

Specified by:
getResources in interface IArchive
Throws:
ArchiveException

getResources

public Iterator<URL> getResources(String resourceName)
                           throws ArchiveException

Specified by:
getResources in interface IArchive
Throws:
ArchiveException

getURL

public URL getURL()
           throws ArchiveException

Specified by:
getURL in interface IArchive
Throws:
ArchiveException

getEntries

public Iterator<String> getEntries()
                            throws ArchiveException

Specified by:
getEntries in interface IArchive
Throws:
ArchiveException

toString

public String toString()
Overrides:
toString in class Object
Returns:
a string representation of the object.


Copyright © 2007-2012 OW2 Consortium. All Rights Reserved.