Class ThreadRecord


  • public class ThreadRecord
    extends java.lang.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 Detail

      • ThreadRecord

        public ThreadRecord​(LittleEndianByteInputStream bs)
                     throws java.io.IOException
        Construct the ThreadRecord and read the header details with no hints from the Header Block.
        Throws:
        java.io.IOException
      • ThreadRecord

        public ThreadRecord​(HeaderBlock hb,
                            LittleEndianByteInputStream bs)
                     throws java.io.IOException
        Construct the ThreadRecord and read the header details.
        Throws:
        java.io.IOException
    • Method Detail

      • readThreadData

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

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

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

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

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

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

        public void setThreadClass​(ThreadClass threadClass)
      • 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)