org.glassfish.api.deployment.archive
Interface WritableArchive

All Superinterfaces:
Archive

@Contract
public interface WritableArchive
extends Archive

Interface for implementing write access to an underlying archive on a unspecified medium

Author:
Jerome Dochez

Method Summary
 void closeEntry()
          closes the current entry
 void closeEntry(WritableArchive subArchive)
          Close a previously returned sub archive
 void create(java.net.URI uri)
          creates a new abstract archive with the given path
 WritableArchive createSubArchive(java.lang.String name)
          Returns an instance of this archive abstraction for an embedded archive within this archive.
 java.io.OutputStream putNextEntry(java.lang.String name)
          Create a new entry in the archive
 
Methods inherited from interface org.glassfish.api.deployment.archive.Archive
close, entries, entries, getArchiveSize, getDirectories, getManifest, getName, getURI, isDirectory
 

Method Detail

create

void create(java.net.URI uri)
            throws java.io.IOException
creates a new abstract archive with the given path

Parameters:
uri - the path to create the archive
Throws:
java.io.IOException

closeEntry

void closeEntry(WritableArchive subArchive)
                throws java.io.IOException
Close a previously returned sub archive

Parameters:
subArchive - output stream to close
Throws:
java.io.IOException

putNextEntry

java.io.OutputStream putNextEntry(java.lang.String name)
                                  throws java.io.IOException
Create a new entry in the archive

Parameters:
name - the entry name
Throws:
java.io.IOException

closeEntry

void closeEntry()
                throws java.io.IOException
closes the current entry

Throws:
java.io.IOException

createSubArchive

WritableArchive createSubArchive(java.lang.String name)
                                 throws java.io.IOException
Returns an instance of this archive abstraction for an embedded archive within this archive.

Parameters:
name - is the entry name relative to the root for the archive
Returns:
the Archive instance for this abstraction
Throws:
java.io.IOException


Copyright © 2012 GlassFish Community. All Rights Reserved.