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.
-
ResourceSection(String, int, long, DataInput, ArchiveReader)
- Creates and initializes a new ResourceSection
-
closeStream()
- Closes the stream
-
getCount()
-
Gets the number of resources in this section
-
getName()
-
Gets the name of this section
-
getSize()
-
Gets the size of this section, in bytes
-
getStream()
-
Gets the stream pointing to the beginning of this section
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.
closeStream
public void closeStream()
- Closes the stream
getName
public String getName()
- Gets the name of this section
- Returns:
- The name of this section
getCount
public int getCount()
- Gets the number of resources in this section
- Returns:
- The number of resources in this section
getSize
public long getSize()
- Gets the size of this section, in bytes
- Returns:
- The size of this section, in bytes
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