All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.core.ResourceSection

java.lang.Object
   |
   +----com.sun.wizards.core.ResourceSection

public class ResourceSection
extends Object
This class defines a section in the wizard archive. Objects requesting named streams get one of these, and can then use it to query the stream length, count, etc.


Constructor Index

 o ResourceSection(String, int, long, DataInput, ArchiveReader)
Creates and initializes a new ResourceSection

Method Index

 o closeStream()
Closes the stream
 o getCount()
Gets the number of resources in this section
 o getName()
Gets the name of this section
 o getSize()
Gets the size of this section, in bytes
 o getStream()
Gets the stream pointing to the beginning of this section

Constructors

 o ResourceSection
 public ResourceSection(String name,
                        int count,
                        long size,
                        DataInput stream,
                        ArchiveReader reader)
Creates and initializes a new ResourceSection

Parameters:
name - The name of the section within the archive
count - The number of resources in this section
size - The total size of the section, not including the name, count, or size
stream - The stream pointing to the beginning of the section. If this stream were to skip size bytes, it would be pointing at the next section.
reader - The ArchiveReader that is reading this stream. It is responsible for closing the stream.

Methods

 o closeStream
 public void closeStream()
Closes the stream

 o getName
 public String getName()
Gets the name of this section

Returns:
The name of this section
 o getCount
 public int getCount()
Gets the number of resources in this section

Returns:
The number of resources in this section
 o getSize
 public long getSize()
Gets the size of this section, in bytes

Returns:
The size of this section, in bytes
 o getStream
 public DataInput getStream()
Gets the stream pointing to the beginning of this section

Returns:
the stream pointing to the beginning of this section

All Packages  Class Hierarchy  This Package  Previous  Next  Index