org.ejtools.archive
Class JarEntry

java.lang.Object
  |
  +--org.ejtools.archive.JarEntry
All Implemented Interfaces:
Entry
Direct Known Subclasses:
JarArchive

public class JarEntry
extends java.lang.Object
implements Entry

Implementation for a Jar based entry.

Version:
$Revision: 1.2 $
Author:
Laurent Etiemble

Constructor Summary
JarEntry(java.lang.String uri)
          Constructor for the JarEntry object
 
Method Summary
 void accept(Reader visitor)
          Visitor Pattern method to accept a Reader visitor
 void accept(Writer visitor)
          Visitor Pattern method to accept a Writer visitor
 void addTo(Archive archive)
          Adds this entry to an archive
 byte[] getContent()
          Returns the content of this entry
 java.lang.String getURI()
          Return the absolute URI of this entry
 boolean isArchive()
          Always returns false as it is not an archive
 void setContent(byte[] content)
          Sets the content of this entry
 void setURI(java.lang.String uri)
          Sets the URI of this entry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarEntry

public JarEntry(java.lang.String uri)
Constructor for the JarEntry object

Parameters:
uri - The URI of the entry
Method Detail

accept

public void accept(Writer visitor)
Visitor Pattern method to accept a Writer visitor

Specified by:
accept in interface Entry
Parameters:
visitor - The writer visitor

accept

public void accept(Reader visitor)
Visitor Pattern method to accept a Reader visitor

Specified by:
accept in interface Entry
Parameters:
visitor - The reader visitor

addTo

public void addTo(Archive archive)
Adds this entry to an archive

Specified by:
addTo in interface Entry
Parameters:
archive - The archive to be added to

getContent

public byte[] getContent()
Returns the content of this entry

Specified by:
getContent in interface Entry
Returns:
The content

getURI

public java.lang.String getURI()
Return the absolute URI of this entry

Specified by:
getURI in interface Entry
Returns:
The URI

isArchive

public boolean isArchive()
Always returns false as it is not an archive

Specified by:
isArchive in interface Entry
Returns:
Always false

setContent

public void setContent(byte[] content)
Sets the content of this entry

Specified by:
setContent in interface Entry
Parameters:
content - The new content

setURI

public void setURI(java.lang.String uri)
Sets the URI of this entry

Specified by:
setURI in interface Entry
Parameters:
uri - The new URI


Copyright © 2002-2003 EJTools Org.. All Rights Reserved.