Package hudson.console
Class AnnotatedLargeText<T>
- java.lang.Object
-
- org.kohsuke.stapler.framework.io.LargeText
-
- hudson.console.AnnotatedLargeText<T>
-
- Type Parameters:
T- Context type.
public class AnnotatedLargeText<T> extends org.kohsuke.stapler.framework.io.LargeTextExtension toLargeTextthat handles annotations byConsoleAnnotator.In addition to run each line through
ConsoleAnnotationOutputStreamfor adding markup, this class persistsConsoleAnnotatorinto a byte sequence and send it to the client as an HTTP header. The client JavaScript sends it back next time it fetches the following output.The serialized
ConsoleAnnotatoris encrypted to avoid malicious clients from instantiating arbitraryConsoleAnnotators.- Since:
- 1.349
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description AnnotatedLargeText(File file, Charset charset, boolean completed, T context)AnnotatedLargeText(org.kohsuke.stapler.framework.io.ByteBuffer memory, Charset charset, boolean completed, T context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoProgressiveHtml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)voiddoProgressiveText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp)Aliasing what I think was a wrong name inLargeTextprotected voidsetContentType(org.kohsuke.stapler.StaplerResponse rsp)longwriteHtmlTo(long start, Writer w)longwriteLogTo(long start, OutputStream out)Strips annotations using aPlainTextConsoleOutputStream.longwriteLogTo(long start, Writer w)longwriteRawLogTo(long start, OutputStream out)CallsLargeText.writeLogTo(long, OutputStream)without stripping annotations aswriteLogTo(long, OutputStream)would.
-
-
-
Method Detail
-
doProgressiveHtml
public void doProgressiveHtml(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException- Throws:
IOException
-
doProgressiveText
public void doProgressiveText(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOExceptionAliasing what I think was a wrong name inLargeText- Throws:
IOException
-
setContentType
protected void setContentType(org.kohsuke.stapler.StaplerResponse rsp)
- Overrides:
setContentTypein classorg.kohsuke.stapler.framework.io.LargeText
-
writeLogTo
@CheckReturnValue public long writeLogTo(long start, Writer w) throws IOException- Overrides:
writeLogToin classorg.kohsuke.stapler.framework.io.LargeText- Throws:
IOException
-
writeLogTo
@CheckReturnValue public long writeLogTo(long start, OutputStream out) throws IOExceptionStrips annotations using aPlainTextConsoleOutputStream.- Overrides:
writeLogToin classorg.kohsuke.stapler.framework.io.LargeText- Throws:
IOException
-
writeRawLogTo
@CheckReturnValue public long writeRawLogTo(long start, OutputStream out) throws IOExceptionCallsLargeText.writeLogTo(long, OutputStream)without stripping annotations aswriteLogTo(long, OutputStream)would.- Throws:
IOException- Since:
- 1.577
-
writeHtmlTo
@CheckReturnValue public long writeHtmlTo(long start, Writer w) throws IOException- Throws:
IOException
-
-