Package org.kohsuke.stapler.framework.io
Class LargeText
java.lang.Object
org.kohsuke.stapler.framework.io.LargeText
Represents a large text data.
This class defines methods for handling progressive text update.
Usage
- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLargeText
(ByteBuffer memory, boolean completed) LargeText
(ByteBuffer memory, Charset charset, boolean completed) -
Method Summary
Modifier and TypeMethodDescriptionprotected Writer
createWriter
(StaplerRequest2 req, StaplerResponse2 rsp, long size) protected Writer
createWriter
(StaplerRequest req, StaplerResponse rsp, long size) Deprecated.void
doProgressText
(StaplerRequest2 req, StaplerResponse2 rsp) Implements the progressive text handling.void
doProgressText
(StaplerRequest req, StaplerResponse rsp) Deprecated.boolean
long
length()
void
readAll()
ReturnsReader
for reading the raw bytes.protected void
Deprecated.protected void
long
writeLogTo
(long start, OutputStream out) Writes the tail portion of the file to theOutputStream
.long
writeLogTo
(long start, Writer w)
-
Field Details
-
charset
-
-
Constructor Details
-
LargeText
-
LargeText
- 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
-
LargeText
- 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
-
LargeText
-
-
Method Details
-
markAsComplete
public void markAsComplete() -
isComplete
public boolean isComplete() -
length
public long length() -
readAll
ReturnsReader
for reading the raw bytes.- Throws:
IOException
-
writeLogTo
- Throws:
IOException
-
writeLogTo
Writes the tail portion of the file to theOutputStream
.- 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 sizeIOException
-
doProgressText
Implements the progressive text handling. This method is used as a "web method" with progressiveText.jelly.- Throws:
IOException
-
doProgressText
Deprecated.Implements the progressive text handling. This method is used as a "web method" with progressiveText.jelly.- Throws:
IOException
-
setContentType
-
setContentType
Deprecated. -
createWriter
protected Writer createWriter(StaplerRequest2 req, StaplerResponse2 rsp, long size) throws IOException - Throws:
IOException
-
createWriter
@Deprecated protected Writer createWriter(StaplerRequest req, StaplerResponse rsp, long size) throws IOException Deprecated.- Throws:
IOException
-
createWriter(StaplerRequest2, StaplerResponse2, long)