org.jmol.util
public class CompoundDocument extends BinaryDocument
Modifier and Type | Class and Description |
---|---|
(package private) class |
CompoundDocument.CmpDocDirectoryEntry |
(package private) class |
CompoundDocument.CmpDocHeader |
Modifier and Type | Field and Description |
---|---|
(package private) StringBuffer |
data |
(package private) List<CompoundDocument.CmpDocDirectoryEntry> |
directory |
(package private) CompoundDocument.CmpDocHeader |
header |
(package private) int |
nDirEntriesperSector |
(package private) int |
nIntPerSector |
(package private) int |
nShortSectorsPerStandardSector |
(package private) CompoundDocument.CmpDocDirectoryEntry |
rootEntry |
(package private) int[] |
SAT |
(package private) int |
sectorSize |
(package private) int |
shortSectorSize |
(package private) int[] |
SSAT |
isBigEndian, isRandom, nBytes, os, stream
Constructor and Description |
---|
CompoundDocument(BufferedInputStream bis) |
Modifier and Type | Method and Description |
---|---|
StringBuffer |
getAllData() |
StringBuffer |
getAllData(String binaryFileList,
String firstFile) |
void |
getAllData(String prefix,
String binaryFileList,
Map<String,String> fileData)
reads a compound document directory and saves all data in a Hashtable
so that the files may be organized later in a different order.
|
List<CompoundDocument.CmpDocDirectoryEntry> |
getDirectory() |
String |
getDirectoryListing(String separator) |
private void |
getDirectoryTable() |
private StringBuffer |
getFileAsString(CompoundDocument.CmpDocDirectoryEntry thisEntry,
boolean asBinaryString) |
StringBuffer |
getFileAsString(String entryName) |
private long |
getOffset(int SID) |
private void |
getSectorAllocationTable() |
private int |
getSectorData(StringBuffer data,
byte[] byteBuf,
int nSectorBytes,
int nBytes,
boolean asBinaryString,
ZipUtil.GZipData gzipData) |
private void |
getShortSectorAllocationTable() |
private StringBuffer |
getShortStringData(int shortSID,
int nBytes,
boolean asBinaryString) |
private StringBuffer |
getStandardStringData(int thisSID,
int nBytes,
boolean asBinaryString) |
private void |
gotoSector(int SID) |
static boolean |
isCompoundDocument(byte[] bytes) |
static boolean |
isCompoundDocument(InputStream is) |
private boolean |
readHeader() |
close, getPosition, readByte, readByteArray, readByteArray, readDouble, readFloat, readInt, readLong, readShort, readString, readUnsignedShort, seek, setIsBigEndian, setOutputStream, setRandom, setStream, setStream, swapBytes, swapBytes, writeBytes, writeBytes, writeInt, writeLong, writeShort
CompoundDocument.CmpDocHeader header
List<CompoundDocument.CmpDocDirectoryEntry> directory
CompoundDocument.CmpDocDirectoryEntry rootEntry
int[] SAT
int[] SSAT
int sectorSize
int shortSectorSize
int nShortSectorsPerStandardSector
int nIntPerSector
int nDirEntriesperSector
StringBuffer data
public CompoundDocument(BufferedInputStream bis)
public static boolean isCompoundDocument(InputStream is) throws Exception
Exception
public static boolean isCompoundDocument(byte[] bytes)
public List<CompoundDocument.CmpDocDirectoryEntry> getDirectory()
public StringBuffer getAllData()
public void getAllData(String prefix, String binaryFileList, Map<String,String> fileData)
prefix
- binaryFileList
- |-separated list of files that should be saved
as xx xx xx hex byte strings. The directory listing
is appended with ":asBinaryString"fileData
- public StringBuffer getAllData(String binaryFileList, String firstFile)
public StringBuffer getFileAsString(String entryName)
private long getOffset(int SID)
private void gotoSector(int SID)
private boolean readHeader()
private void getSectorAllocationTable()
private void getShortSectorAllocationTable()
private void getDirectoryTable()
private StringBuffer getFileAsString(CompoundDocument.CmpDocDirectoryEntry thisEntry, boolean asBinaryString)
private StringBuffer getStandardStringData(int thisSID, int nBytes, boolean asBinaryString)
private int getSectorData(StringBuffer data, byte[] byteBuf, int nSectorBytes, int nBytes, boolean asBinaryString, ZipUtil.GZipData gzipData) throws Exception
Exception
private StringBuffer getShortStringData(int shortSID, int nBytes, boolean asBinaryString)