Class LargeText


  • public class LargeText
    extends Object
    Represents a large text data.

    This class defines methods for handling progressive text update.

    Usage

    Author:
    Kohsuke Kawaguchi
    • Field Detail

      • charset

        protected final Charset charset
    • Constructor Detail

      • LargeText

        public LargeText​(File file,
                         boolean completed)
      • LargeText

        public LargeText​(File file,
                         boolean completed,
                         boolean transparentGunzip)
        Parameters:
        transparentGunzip - if set to true, this class will detect if the given file is compressed with GZIP. If so, it will transparently uncompress its content during read-access. Do note that the underlying file is not altered and remains compressed.
        Since:
        1.196
      • LargeText

        public LargeText​(File file,
                         Charset charset,
                         boolean completed)
      • LargeText

        public LargeText​(File file,
                         Charset charset,
                         boolean completed,
                         boolean transparentGunzip)
        Parameters:
        transparentGunzip - if set to true, this class will detect if the given file is compressed with GZIP. If so, it will transparently uncompress its content during read-access. Do note that the underlying file is not altered and remains compressed.
        Since:
        1.196
      • LargeText

        public LargeText​(ByteBuffer memory,
                         boolean completed)
      • LargeText

        public LargeText​(ByteBuffer memory,
                         Charset charset,
                         boolean completed)
    • Method Detail

      • markAsComplete

        public void markAsComplete()
      • isComplete

        public boolean isComplete()
      • length

        public long length()
      • writeLogTo

        public long writeLogTo​(long start,
                               OutputStream out)
                        throws IOException
        Writes the tail portion of the file to the OutputStream.
        Parameters:
        start - The byte offset in the input file where the write operation starts.
        Returns:
        if the file is still being written, this method writes the file until the last newline character and returns the offset to start the next write operation.
        Throws:
        EOFException - if the start position is larger than the file size
        IOException