Class ChunkedOutputStream

java.lang.Object
java.io.OutputStream
net.targetr.wtm3.io.ChunkedOutputStream
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable

public class ChunkedOutputStream extends OutputStream
Writes a chunked output stream.

Used by HTTP/1.1 to transfer content of unknown length.

Author:
Dr Michael Gardiner
  • Field Details

    • CHUNKING_BUFFER_SIZE

      public static int CHUNKING_BUFFER_SIZE
      The size recommended when writing chunked data.
    • CHUNKING_WRITE_DELAY

      public static int CHUNKING_WRITE_DELAY
      The time in milliseconds to delay writing data to ensure chunks are a sensible size.
  • Constructor Details

    • ChunkedOutputStream

      public ChunkedOutputStream(OutputStream out)
      Decorates an output stream to enable writing in chunks to a HTTP/1.1 client.
      Parameters:
      out - The chunked output stream.
  • Method Details