public class StorageTable extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
BIGSTORAGE_SIZE |
static int |
DIRECTORY_SIZE |
static int |
TABLE_SIZE |
| Constructor and Description |
|---|
StorageTable() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
clear out object references in prep for closing workbook
|
Storage |
createStorage(String name,
int type,
int insertIdx)
Create a new Storage and add to the directory array
NOTE: add any associated data separately |
void |
DEBUG() |
Storage |
getChild(String name)
get the child directory (storage or stream) of the named storage
|
Storage |
getDirectoryByName(String name)
get the directory by name.
|
int |
getDirectoryStreamID(String name)
returns the Stream ID of the named directory, or -1 if not found
|
Storage |
getNext(String name)
get the next directory (storage or stream) of the named storage
|
int |
getNumDirectories()
return the number of existing directories
|
Storage |
getPrevious(String name)
get the previous directory (storage or stream) of the named storage
|
void |
init(ByteBuffer dta,
LEOHeader h,
List blockvect,
int[] FAT)
initialize the directory entry array
|
void |
initDirectories(List blockvect,
int[] FAT) |
List |
initMiniStream(List blockvect,
int[] FAT)
// whenever a stream is shorter than a specific length
// it is stored as a short-stream or ministream.
|
static void |
writeitout(List blocks,
String name)
write out the directory bytes for debugging
|
public static final int TABLE_SIZE
public static final int DIRECTORY_SIZE
public static final int BIGSTORAGE_SIZE
public void close()
public void init(ByteBuffer dta, LEOHeader h, List blockvect, int[] FAT)
public int getNumDirectories()
public Storage createStorage(String name, int type, int insertIdx)
name - Storage name - must be uniquetype - Storage Type - 1= storage 2= stream 5= root 0=unknown or unallocatedinsertIdx - id where to insert, or -1 to insert at endpublic void initDirectories(List blockvect, int[] FAT)
public List initMiniStream(List blockvect, int[] FAT)
public Storage getDirectoryByName(String name) throws StorageNotFoundException
StorageNotFoundExceptionpublic int getDirectoryStreamID(String name) throws StorageNotFoundException
name - StorageNotFoundExceptionpublic Storage getChild(String name) throws StorageNotFoundException
name - StorageNotFoundExceptionpublic Storage getNext(String name) throws StorageNotFoundException
name - StorageNotFoundExceptionpublic Storage getPrevious(String name) throws StorageNotFoundException
name - StorageNotFoundExceptionpublic static final void writeitout(List blocks, String name)
public void DEBUG()
Copyright © 2002–2019 Starter Inc.. All rights reserved.