org.objectweb.jonas_lib.genbase.utils.ArchiveStorer Class Reference

Inherited by org.objectweb.jonas_lib.genbase.utils.DirStorer, and org.objectweb.jonas_lib.genbase.utils.JarStorer.

Inheritance diagram for org.objectweb.jonas_lib.genbase.utils.ArchiveStorer:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas_lib.genbase.utils.ArchiveStorer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ArchiveStorer (J2EEArchive archive)
void store () throws GenBaseException
J2EEArchive getArchive ()
void setOut (String out)

Static Public Member Functions

I18n getI18n ()

Static Public Attributes

final int MAX_BUFFER_SIZE = 1024

Protected Member Functions

abstract void addFile (String name) throws IOException
abstract String convertName (String name)
abstract OutputStream getOutputStream (String name) throws IOException

Static Protected Member Functions

void fill (InputStream is, OutputStream os) throws IOException

Detailed Description

Store an Archive in compressed or uncompressed format

Author:
Guillaume Sauthier

Definition at line 52 of file ArchiveStorer.java.


Constructor & Destructor Documentation

org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.ArchiveStorer J2EEArchive  archive  ) 
 

Creates a new ArchiveStorer object.

Parameters:
archive archive to be saved

Definition at line 81 of file ArchiveStorer.java.


Member Function Documentation

abstract void org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.addFile String  name  )  throws IOException [protected, pure virtual]
 

add a file in saved archive

Parameters:
name file name
Exceptions:
IOException When save fails

Implemented in org.objectweb.jonas_lib.genbase.utils.DirStorer, and org.objectweb.jonas_lib.genbase.utils.JarStorer.

abstract String org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.convertName String  name  )  [protected, pure virtual]
 

convert a filename from unix to windows filename and reverse

Parameters:
name name to be converted
Returns:
converted filename

Implemented in org.objectweb.jonas_lib.genbase.utils.DirStorer, and org.objectweb.jonas_lib.genbase.utils.JarStorer.

void org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.fill InputStream  is,
OutputStream  os
throws IOException [static, protected]
 

Fill an OutputStream with content from an InputStream

Parameters:
is InputStream
os OutputStream
Exceptions:
IOException When filling fails

Definition at line 96 of file ArchiveStorer.java.

Referenced by org.objectweb.jonas_lib.genbase.utils.JarStorer.addFile(), and org.objectweb.jonas_lib.genbase.utils.DirStorer.addFile().

J2EEArchive org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.getArchive  ) 
 

Returns:
Returns the archive.

Definition at line 183 of file ArchiveStorer.java.

Referenced by org.objectweb.jonas_lib.genbase.utils.JarStorer.addFile(), and org.objectweb.jonas_lib.genbase.utils.DirStorer.addFile().

I18n org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.getI18n  )  [static]
 

Returns:
Returns the i18n.

Definition at line 176 of file ArchiveStorer.java.

Referenced by org.objectweb.jonas_lib.genbase.utils.DirStorer.DirStorer(), org.objectweb.jonas_lib.genbase.utils.DirStorer.getOutputStream(), org.objectweb.jonas_lib.genbase.utils.JarStorer.JarStorer(), and org.objectweb.jonas_lib.genbase.utils.JarStorer.store().

abstract OutputStream org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.getOutputStream String  name  )  throws IOException [protected, pure virtual]
 

Returns an OutputStream from the given name

Parameters:
name the filename we want to open/create
Returns:
an OutputStream from the given name
Exceptions:
IOException When OS cannot be created

Implemented in org.objectweb.jonas_lib.genbase.utils.DirStorer, and org.objectweb.jonas_lib.genbase.utils.JarStorer.

void org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.setOut String  out  ) 
 

Parameters:
out The out to set.

Definition at line 190 of file ArchiveStorer.java.

Referenced by org.objectweb.jonas_lib.genbase.utils.DirStorer.DirStorer(), and org.objectweb.jonas_lib.genbase.utils.JarStorer.JarStorer().

void org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.store  )  throws GenBaseException
 

Store the content of the contained archive.

Exceptions:
GenBaseException When cannot add all files

Reimplemented in org.objectweb.jonas_lib.genbase.utils.JarStorer.

Definition at line 139 of file ArchiveStorer.java.

References org.objectweb.jonas_lib.genbase.archive.J2EEArchive.getContainedFiles(), org.objectweb.jonas_lib.genbase.archive.J2EEArchive.getDescriptors(), org.objectweb.jonas_lib.I18n.getMessage(), org.objectweb.jonas_lib.genbase.archive.J2EEArchive.omit(), and org.objectweb.jonas_lib.xml.XMLSerializer.serialize().

Referenced by org.objectweb.jonas_lib.genbase.modifier.ArchiveModifier.save().

Here is the call graph for this function:


Member Data Documentation

final int org.objectweb.jonas_lib.genbase.utils.ArchiveStorer.MAX_BUFFER_SIZE = 1024 [static]
 

Buffer Size

Definition at line 55 of file ArchiveStorer.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:12:59 2005 for JOnAS by  doxygen 1.3.9.1