Package com.webcodepro.shrinkit
Class ThreadRecord
java.lang.Object
com.webcodepro.shrinkit.ThreadRecord
This represents a single thread from the Shrinkit archive.
As it is constructed, the thread "header" is read. Once all
threads have been constructed, use
readThreadData
to load up the data.
Depending on the type of thread, the data may be text. If so,
isText
will return true and getText
will return the string. Otherwise the data should be read through
one of the InputStream
options.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct the ThreadRecord and read the header details.Construct the ThreadRecord and read the header details with no hints from the Header Block. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
getBytes()
Get raw data bytes (compressed).long
Get the appropriate input data stream for this thread to decompress the contents.Get the raw data input stream.getText()
Return the text data.int
byte[]
long
boolean
isText()
Determine if this is a text-type field.void
Read the raw thread data.void
setCompThreadEof
(long compThreadEof) void
setThreadClass
(ThreadClass threadClass) void
setThreadCrc
(int threadCrc) void
setThreadData
(byte[] threadData) void
setThreadEof
(long threadEof) void
setThreadFormat
(ThreadFormat threadFormat) void
setThreadKind
(ThreadKind threadKind)
-
Constructor Details
-
ThreadRecord
Construct the ThreadRecord and read the header details with no hints from the Header Block.- Throws:
IOException
-
ThreadRecord
Construct the ThreadRecord and read the header details.- Throws:
IOException
-
-
Method Details
-
readThreadData
Read the raw thread data. This must be called.- Throws:
IOException
-
isText
public boolean isText()Determine if this is a text-type field. -
getText
Return the text data. -
getBytes
public byte[] getBytes()Get raw data bytes (compressed). -
getRawInputStream
Get the raw data input stream. -
getInputStream
Get the appropriate input data stream for this thread to decompress the contents.- Throws:
IOException
-
getThreadClass
-
setThreadClass
-
getThreadFormat
-
setThreadFormat
-
getThreadKind
-
setThreadKind
-
getThreadCrc
public int getThreadCrc() -
setThreadCrc
public void setThreadCrc(int threadCrc) -
getThreadEof
public long getThreadEof() -
setThreadEof
public void setThreadEof(long threadEof) -
getCompThreadEof
public long getCompThreadEof() -
setCompThreadEof
public void setCompThreadEof(long compThreadEof) -
getThreadData
public byte[] getThreadData() -
setThreadData
public void setThreadData(byte[] threadData)
-