Class ThreadRecord

java.lang.Object
com.webcodepro.shrinkit.ThreadRecord

public class ThreadRecord extends Object
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 Details

  • Method Details

    • readThreadData

      public void readThreadData(LittleEndianByteInputStream bs) throws IOException
      Read the raw thread data. This must be called.
      Throws:
      IOException
    • isText

      public boolean isText()
      Determine if this is a text-type field.
    • getText

      public String getText()
      Return the text data.
    • getBytes

      public byte[] getBytes()
      Get raw data bytes (compressed).
    • getRawInputStream

      public InputStream getRawInputStream()
      Get the raw data input stream.
    • getInputStream

      public InputStream getInputStream() throws IOException
      Get the appropriate input data stream for this thread to decompress the contents.
      Throws:
      IOException
    • getThreadClass

      public ThreadClass getThreadClass()
    • setThreadClass

      public void setThreadClass(ThreadClass threadClass)
    • getThreadFormat

      public ThreadFormat getThreadFormat()
    • setThreadFormat

      public void setThreadFormat(ThreadFormat threadFormat)
    • getThreadKind

      public ThreadKind getThreadKind()
    • setThreadKind

      public void setThreadKind(ThreadKind threadKind)
    • 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)