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) java.lang.StringBuffer |
data |
(package private) java.util.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(java.io.BufferedInputStream bis) |
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuffer |
getAllData() |
java.lang.StringBuffer |
getAllData(java.lang.String binaryFileList,
java.lang.String firstFile) |
void |
getAllData(java.lang.String prefix,
java.lang.String binaryFileList,
java.util.Map<java.lang.String,java.lang.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.
|
java.util.List<CompoundDocument.CmpDocDirectoryEntry> |
getDirectory() |
java.lang.String |
getDirectoryListing(java.lang.String separator) |
private void |
getDirectoryTable() |
private java.lang.StringBuffer |
getFileAsString(CompoundDocument.CmpDocDirectoryEntry thisEntry,
boolean asBinaryString) |
java.lang.StringBuffer |
getFileAsString(java.lang.String entryName) |
private long |
getOffset(int SID) |
private void |
getSectorAllocationTable() |
private int |
getSectorData(java.lang.StringBuffer data,
byte[] byteBuf,
int nSectorBytes,
int nBytes,
boolean asBinaryString,
ZipUtil.GZipData gzipData) |
private void |
getShortSectorAllocationTable() |
private java.lang.StringBuffer |
getShortStringData(int shortSID,
int nBytes,
boolean asBinaryString) |
private java.lang.StringBuffer |
getStandardStringData(int thisSID,
int nBytes,
boolean asBinaryString) |
private void |
gotoSector(int SID) |
static boolean |
isCompoundDocument(byte[] bytes) |
static boolean |
isCompoundDocument(java.io.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
java.util.List<CompoundDocument.CmpDocDirectoryEntry> directory
CompoundDocument.CmpDocDirectoryEntry rootEntry
int[] SAT
int[] SSAT
int sectorSize
int shortSectorSize
int nShortSectorsPerStandardSector
int nIntPerSector
int nDirEntriesperSector
java.lang.StringBuffer data
public static boolean isCompoundDocument(java.io.InputStream is) throws java.lang.Exception
java.lang.Exception
public static boolean isCompoundDocument(byte[] bytes)
public java.util.List<CompoundDocument.CmpDocDirectoryEntry> getDirectory()
public java.lang.String getDirectoryListing(java.lang.String separator)
public java.lang.StringBuffer getAllData()
public void getAllData(java.lang.String prefix, java.lang.String binaryFileList, java.util.Map<java.lang.String,java.lang.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 java.lang.StringBuffer getAllData(java.lang.String binaryFileList, java.lang.String firstFile)
public java.lang.StringBuffer getFileAsString(java.lang.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 java.lang.StringBuffer getFileAsString(CompoundDocument.CmpDocDirectoryEntry thisEntry, boolean asBinaryString)
private java.lang.StringBuffer getStandardStringData(int thisSID, int nBytes, boolean asBinaryString)
private int getSectorData(java.lang.StringBuffer data, byte[] byteBuf, int nSectorBytes, int nBytes, boolean asBinaryString, ZipUtil.GZipData gzipData) throws java.lang.Exception
java.lang.Exception
private java.lang.StringBuffer getShortStringData(int shortSID, int nBytes, boolean asBinaryString)