Class ThreadRecord
java.lang.Object
org.applecommander.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.
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]getBytes()Get raw data bytes (compressed).longgetText()Return the text data.intbyte[]longbooleanisText()Determine if this is a text-type field.byte[]Read all bytes from the record.voidsetCompThreadEof(long compThreadEof) voidsetThreadClass(ThreadClass threadClass) voidsetThreadCrc(int threadCrc) voidsetThreadData(byte[] threadData) voidsetThreadEof(long threadEof) voidsetThreadFormat(ThreadFormat threadFormat) voidsetThreadKind(ThreadKind threadKind)
-
Method Details
-
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). -
readThreadData
Read all bytes from the record.- 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)
-